You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin uses [cssnano](https://cssnano.co/) to optimize and minify your CSS.
25
25
26
-
Just like [optimize-css-assets-webpack-plugin](https://github.com/NMFR/optimize-css-assets-webpack-plugin) but more accurate with source maps and assets using query string, allows to cache and works in parallel mode.
26
+
Just like [optimize-css-assets-webpack-plugin](https://github.com/NMFR/optimize-css-assets-webpack-plugin) but more accurate with source maps and assets using query string, allows caching and works in parallel mode.
27
27
28
28
## Getting Started
29
29
@@ -57,6 +57,7 @@ module.exports = {
57
57
newCssMinimizerPlugin(),
58
58
],
59
59
},
60
+
plugins: [newMiniCssExtractPlugin()],
60
61
};
61
62
```
62
63
@@ -175,7 +176,7 @@ Default: `true`
175
176
Use multi-process parallel running to improve the build speed.
176
177
Default number of concurrent runs: `os.cpus().length - 1`.
177
178
178
-
> ℹ️ Parallelization can speedup your build significantly and is therefore **highly recommended**.
179
+
> ℹ️ Parallelization can speed up your build significantly and is therefore **highly recommended**.
179
180
> If a parallelization is enabled, the packages in `minimizerOptions` must be required via strings (`packageName` or `require.resolve(packageName)`). Read more in [`minimizerOptions`](#minimizeroptions)
180
181
181
182
#### `Boolean`
@@ -221,16 +222,17 @@ module.exports = {
221
222
Type: `Function|Array<Function>`
222
223
Default: `CssMinimizerPlugin.cssnanoMinify`
223
224
224
-
Allows to override default minify function.
225
-
By default plugin uses [cssnano](https://github.com/cssnano/cssnano) package.
225
+
Allows overriding default minify function.
226
+
By default, plugin uses [cssnano](https://github.com/cssnano/cssnano) package.
226
227
Useful for using and testing unpublished versions or forks.
|**[`extractComments`](#extractcomments)**|`Boolean\|String\|RegExp\|Function<(node, comment) -> Boolean\|Object>\|Object`|`true`| Whether comments shall be extracted to a separate file.|
|**[`extractComments`](#extractcomments)**|`Boolean\|String\|RegExp\|Function<(node, comment) -> Boolean\|Object>\|Object`|`true`| Whether comments shall be extracted to a separate file. |
75
75
76
76
### `test`
77
77
@@ -195,7 +195,7 @@ Type: `Function`
195
195
Default: `TerserPlugin.terserMinify`
196
196
197
197
Allows you to override default minify function.
198
-
By default plugin uses [terser](https://github.com/terser-js/terser) package.
198
+
By default plugin uses [terser](https://github.com/terser/terser) package.
199
199
Useful for using and testing unpublished versions or forks.
200
200
201
201
> ⚠️ **Always use `require` inside `minify` function when `parallel` option enabled**.
0 commit comments