webpack-ignore-optional

1.6.0 • Public • Published

Ignore optional dependencies

Prevent issues with fsevents and other breaking, platform-specific optionalDependencies in package.json by including this plugin first in the plugins stack.

Only points module sources to the empty module if it is found in package.json > optionalDependencies.

webpack.config.js

const ignoreOptional = require('webpack-ignore-optional');
{
  ...
  plugins: [
    ignoreOptional(),
    ...
  ],
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.6.0
    3
    • latest

Version History

Package Sidebar

Install

npm i webpack-ignore-optional

Weekly Downloads

3

Version

1.6.0

License

MIT

Unpacked Size

2.13 kB

Total Files

4

Last publish

Collaborators

  • ctjlewis