A webpack loader that returns an empty module.
One use for this loader is to silence modules imported by a dependency. Say, for example, your project relies on an ES6 library that imports a polyfill you don't need, so removing it will cause no loss in functionality.
To begin, you'll need to install
$ npm install null-loader --save-dev
Then add the loader to your
webpack config. For example:
// webpack.config.jsconst path = ;moduleexports =module:rules:// Test for a polyfill (or any file) and it won't be included in your// bundletest: pathuse: 'null-loader';
webpack via your preferred method.
Please take a moment to read our contributing guidelines if you haven't yet done so.