I'm trying to explore webpack on purpose to minify my JS and SCSS file. On purpose to do that I use CSSMinimizer and TerserPlugin for webback
module.exports = {
entry: {
style:'./asset/sass/main.scss',
},
output:{
path:path.resolve(__dirname,'asset/dist'),
},
module: {
rules: [
{
test: /.s?css$/,
use: [MiniCssExtractPlugin.loader, "css-loader", "sass-loader"],
}
],
},
optimization: {
minimize: true,
minimizer: [
'...',
new CssMinimizerPlugin(),
new TerserPlugin()
],
},
plugins: [new MiniCssExtractPlugin()],
};
The issue is it create a style.css but also a style.js whitch I don't want any idea how to remove those unwanted files ?