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
Copy file name to clipboardExpand all lines: README.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,10 +91,13 @@ Finally, run Webpack using your preferred method.
91
91
Why? Because CSS support only these source map types.
92
92
93
93
The plugin respects the [`devtool`](https://webpack.js.org/configuration/devtool/) setting and uses the `SourceMapDevToolPlugin` internally.
94
+
94
95
Using a supported `devtool` value enables source map generation.
96
+
95
97
Enabling the `columns` option in `SourceMapDevToolPlugin` also allows source map generation.
96
98
97
99
Use source maps to map error message locations to their original modules (note that this may slow down compilation).
100
+
98
101
If you use your own `minify` function please refer to the `minify` section for correct handling of source maps.
99
102
100
103
## Options
@@ -179,6 +182,7 @@ module.exports = {
179
182
- Default: `true`
180
183
181
184
Use multi-process parallel running to improve the build speed.
185
+
182
186
The default number of concurrent runs: `os.cpus().length - 1` or `os.availableParallelism() - 1` (if this function is supported).
183
187
184
188
> ℹ️ Parallelization can speed up your build significantly and is therefore **highly recommended**.
@@ -228,8 +232,10 @@ module.exports = {
228
232
- Default: `CssMinimizerPlugin.cssnanoMinify`
229
233
230
234
Overrides the default minify function.
235
+
231
236
By default, plugin uses [cssnano](https://github.com/cssnano/cssnano) package.
232
-
This is useful when using or testing unpublished versions or forks.
237
+
238
+
> This is useful when using or testing unpublished versions or forks.
233
239
234
240
Possible options:
235
241
@@ -271,6 +277,7 @@ module.exports = {
271
277
#### `Array`
272
278
273
279
If an array of functions is passed to the `minify` option, the `minimizerOptions` must also be an array.
280
+
274
281
The function index in the `minify` array corresponds to the options object with the same index in the `minimizerOptions` array.
275
282
276
283
**webpack.config.js**
@@ -337,6 +344,7 @@ module.exports = {
337
344
#### `Array`
338
345
339
346
The function index in the `minify` array corresponds to the options object with the same index in the `minimizerOptions` array.
347
+
340
348
If you use `minimizerOptions` like object, all `minify` function accept it.
341
349
342
350
> If parallelization is enabled, the packages in `minimizerOptions` must be referenced via strings (`packageName` or `require.resolve(packageName)`). In this case, we shouldn't use `require`/`import`.
@@ -362,6 +370,7 @@ module.exports = {
362
370
- Default: `{ from: assetName }`
363
371
364
372
Allows filtering options [`processoptions`](https://postcss.org/api/#processoptions) for the cssnano.
373
+
365
374
The `parser`,` stringifier` and `syntax` can be either a function or a string indicating the module that will be imported.
0 commit comments