suppress-files-webpack-plugin
v1.0.0
Published
Webpack plugin to remove files that match a regex from the build output.
Downloads
4
Maintainers
Readme
suppress-files-webpack-plugin
Webpack plugin for removing files with names that match a regex from the build output.
When working with complex Webpack builds and async loaded chunks, sometimes you need to exclude or suppress certain files from being outputted.
$ npm install --save-dev suppress-files-webpack-plugin
In your webpack.config.js
:
plugins: [
new SuppressFilesPlugin({
match: /\.js$/
})
],
You can provide a RegExp
to the match
parameter which is compared against the file name of the chunk. Anything that matches will be deleted from the outputted build.