filter-webpack-output
v1.2.0
Published
Simple Webpack plugin for filtering output files.
Downloads
33
Readme
Filter Webpack Output
This plugin allow you filter Webpack output files based on RegExp. Will be useful if you wan't omit JS files on compilint extracted CSS.
Installation
npm i -D filter-webpack-output
How to use
import FilterWebpackOutput from 'filter-webpack-output';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
export default {
entry: 'scss/styles.scss',
output: {
path: path.resolve(__dirname, 'dist')
},
module: {
rules: [
{
test: /\.scss$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'sass-loader'
]
}
]
},
plugins: [
new MiniCssExtractPlugin({
filename: "[name].css"
}),
new FilterWebpackOutput(/scss[\\\/](.)*\.(js|map)$/) // You can also pass as array of RegExp
]
}