|
14 | 14 |
|
15 | 15 | # terser-webpack-plugin |
16 | 16 |
|
17 | | -This plugin uses [terser](https://github.com/terser-js/terser) to minify/minimize your JavaScript. |
| 17 | +This plugin uses [terser](https://github.com/terser/terser) to minify/minimize your JavaScript. |
18 | 18 |
|
19 | 19 | ## Getting Started |
20 | 20 |
|
@@ -56,15 +56,15 @@ Using supported `devtool` values enable source map generation. |
56 | 56 |
|
57 | 57 | ## Options |
58 | 58 |
|
59 | | -| Name | Type | Default | Description | |
60 | | -| :---------------------------------------: | :-----------------------------------------------------------------------------: | :-------------------------------------------------------------: | :--------------------------------------------------------------------------- | |
61 | | -| **[`test`](#test)** | `String\|RegExp\|Array<String\|RegExp>` | `/\.m?js(\?.*)?$/i` | Test to match files against. | |
62 | | -| **[`include`](#include)** | `String\|RegExp\|Array<String\|RegExp>` | `undefined` | Files to include. | |
63 | | -| **[`exclude`](#exclude)** | `String\|RegExp\|Array<String\|RegExp>` | `undefined` | Files to exclude. | |
64 | | -| **[`parallel`](#parallel)** | `Boolean\|Number` | `true` | Use multi-process parallel running to improve the build speed. | |
65 | | -| **[`minify`](#minify)** | `Function` | `TerserPlugin.terserMinify` | Allows you to override default minify function. | |
66 | | -| **[`terserOptions`](#terseroptions)** | `Object` | [`default`](https://github.com/terser-js/terser#minify-options) | Terser [minify options](https://github.com/terser-js/terser#minify-options). | |
67 | | -| **[`extractComments`](#extractcomments)** | `Boolean\|String\|RegExp\|Function<(node, comment) -> Boolean\|Object>\|Object` | `true` | Whether comments shall be extracted to a separate file. | |
| 59 | +| Name | Type | Default | Description | |
| 60 | +| :---------------------------------------: | :-----------------------------------------------------------------------------: | :----------------------------------------------------------: | :------------------------------------------------------------------------ | |
| 61 | +| **[`test`](#test)** | `String\|RegExp\|Array<String\|RegExp>` | `/\.m?js(\?.*)?$/i` | Test to match files against. | |
| 62 | +| **[`include`](#include)** | `String\|RegExp\|Array<String\|RegExp>` | `undefined` | Files to include. | |
| 63 | +| **[`exclude`](#exclude)** | `String\|RegExp\|Array<String\|RegExp>` | `undefined` | Files to exclude. | |
| 64 | +| **[`parallel`](#parallel)** | `Boolean\|Number` | `true` | Use multi-process parallel running to improve the build speed. | |
| 65 | +| **[`minify`](#minify)** | `Function` | `TerserPlugin.terserMinify` | Allows you to override default minify function. | |
| 66 | +| **[`terserOptions`](#terseroptions)** | `Object` | [`default`](https://github.com/terser/terser#minify-options) | Terser [minify options](https://github.com/terser/terser#minify-options). | |
| 67 | +| **[`extractComments`](#extractcomments)** | `Boolean\|String\|RegExp\|Function<(node, comment) -> Boolean\|Object>\|Object` | `true` | Whether comments shall be extracted to a separate file. | |
68 | 68 |
|
69 | 69 | ### `test` |
70 | 70 |
|
@@ -188,7 +188,7 @@ Type: `Function` |
188 | 188 | Default: `TerserPlugin.terserMinify` |
189 | 189 |
|
190 | 190 | Allows you to override default minify function. |
191 | | -By default plugin uses [terser](https://github.com/terser-js/terser) package. |
| 191 | +By default plugin uses [terser](https://github.com/terser/terser) package. |
192 | 192 | Useful for using and testing unpublished versions or forks. |
193 | 193 |
|
194 | 194 | > ⚠️ **Always use `require` inside `minify` function when `parallel` option enabled**. |
@@ -245,9 +245,9 @@ module.exports = { |
245 | 245 | ### `terserOptions` |
246 | 246 |
|
247 | 247 | Type: `Object` |
248 | | -Default: [default](https://github.com/terser-js/terser#minify-options) |
| 248 | +Default: [default](https://github.com/terser/terser#minify-options) |
249 | 249 |
|
250 | | -Terser [options](https://github.com/terser-js/terser#minify-options). |
| 250 | +Terser [options](https://github.com/terser/terser#minify-options). |
251 | 251 |
|
252 | 252 | **webpack.config.js** |
253 | 253 |
|
|
0 commit comments