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(),
    ...
  ],
}

/webpack-ignore-optional/

    Package Sidebar

    Install

    npm i webpack-ignore-optional

    Weekly Downloads

    1

    Version

    1.6.0

    License

    MIT

    Unpacked Size

    2.13 kB

    Total Files

    4

    Last publish

    Collaborators

    • ctjlewis