diff --git a/package.json b/package.json index c1ce282..2c4847b 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "license": "ISC", "devDependencies": { "css-loader": "^7.1.2", + "css-minimizer-webpack-plugin": "^7.0.0", "mini-css-extract-plugin": "^2.9.0", "style-loader": "^4.0.0", "webpack": "^5.91.0", diff --git a/webpack.config.js b/webpack.config.js index c6d3672..f6af3d8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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',