Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

trytelework/webpack-ignore-optional-dependencies

Repository files navigation

Disable packages

Disable a package throughout your build process by pointing it to an empty module. This was designed for use with the fsevents package, which breaks builds for Webpack and Rollup alike.

Prerequisites

Mandatory empty peer-dep is required:

yarn add -D empty

webpack.config.js

const disablePackages = require('webpack-disable-package');
{
  ...
  plugins: [
    disablePackages('fsevents', 'my-broken-dependency', ...),
    ...
  ],
}

About

Ignore optional dependencies for Webpack input chunks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published