Removes assets matching a regular expression before they are emitted.
npm i -D webpack-remove-assets-plugin
// webpack.config.js
var RemoveAssetsPlugin = require('webpack-remove-assets-plugin');
module.exports = {
// ... snip ...
plugins: [
new RemoveAssetsPlugin({regex: /.*_nls-.*\.map$/});
],
// ... snip ...
}
The regular expression to match against the assets to remove.