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
@@ -285,10 +287,14 @@ Allows you to override the default minify function.
285
287
By default plugin uses [terser](https://github.com/terser/terser) package.
286
288
Useful for using and testing unpublished versions or forks.
287
289
290
+
An array of functions can also be provided to chain multiple minimizers — the output of each minimizer is fed as input to the next. When an array is used, the [`terserOptions`](#terseroptions) option may also be an array (index-paired with `minify`) or a single object that is reused for every minimizer.
291
+
288
292
> **Warning**
289
293
>
290
294
> **Always use `require` inside `minify` function when `parallel` option enabled**.
291
295
296
+
#### `function`
297
+
292
298
**webpack.config.js**
293
299
294
300
```js
@@ -337,6 +343,36 @@ module.exports = {
337
343
};
338
344
```
339
345
346
+
#### `array`
347
+
348
+
If an array of functions is passed to the `minify` option, the output of each
349
+
minimizer is fed as input to the next one. The `terserOptions` option can be
350
+
either an array of option objects (index-paired with `minify`) or a single
351
+
object that will be shared by all minimizers. Warnings, errors and extracted
0 commit comments