Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,17 @@ module.exports = {
},
optimization: {
minimize: true,
minimizer: [new CssMinimizerPlugin()],
minimizer: [
// For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line
// `...`
new CssMinimizerPlugin(),
],
},
};
```

This will enable CSS optimization only in production mode.
If you want to run it also in development, put the plugin configuration in the `plugins` option array.
If you want to run it also in development set the `optimization.minimize` option to `true`.

And run `webpack` via your preferred method.

Expand Down
131 changes: 61 additions & 70 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
"babel-jest": "^26.3.0",
"clean-css": "^4.2.3",
"copy-webpack-plugin": "^6.1.0",
"copy-webpack-plugin": "^6.1.1",
"cross-env": "^7.0.2",
"css-loader": "^4.3.0",
"csso": "^4.0.3",
Expand All @@ -72,13 +72,13 @@
"eslint-plugin-import": "^2.22.0",
"husky": "^4.3.0",
"jest": "^26.4.2",
"lint-staged": "^10.3.0",
"lint-staged": "^10.4.0",
"memfs": "^3.2.0",
"mini-css-extract-plugin": "^0.11.2",
"node-sass": "^4.14.1",
"npm-run-all": "^4.1.5",
"postcss": "^7.0.32",
"prettier": "^2.1.1",
"prettier": "^2.1.2",
"sass-loader": "^10.0.2",
"standard-version": "^9.0.0",
"webpack": "^4.44.2"
Expand Down
Loading