added css minimizer to webpack

This commit is contained in:
zutto 2024-05-27 09:46:25 +03:00
parent 188806d1f8
commit 213b3918cc

View file

@ -1,5 +1,7 @@
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
module.exports = {
entry: './src/js/app.js',
@ -15,6 +17,11 @@ module.exports = {
},
],
},
optimization: {
minimizer: [
new CssMinimizerPlugin(),
],
},
plugins: [
new MiniCssExtractPlugin({
filename: 'styles.css',