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
{{ message }}
This repository was archived by the owner on Dec 5, 2019. It is now read-only.
⚠️ The plugin has a peer dependency to uglify-js, so in order to use the plugin, also uglify-js has to be installed. The currently (2017/1/25) available uglify-js npm packages; however, do not support minification of ES6 code. In order to support ES6, an ES6-capable, a.k.a. _harmony_, version of UglifyJS has to be provided.
|**`output`**|`{Object}`|`{}`|An object providing options for UglifyJS [OutputStream](https://github.com/mishoo/UglifyJS2/blob/v2.x/lib/output.js) (Lower level access to `Uglifyjs` output)|
64
-
|**`comments`**|{Boolean\|RegExp\|Function<(node, comment) -> {Boolean}>}`| Defaults to preserving comments containing `/*!`, `/**!`, `@preserve` or `@license`. |Comment related configuration. |
65
-
|**`extractComments`**|{Boolean\|RegExp}\|Function<(node, comment) -> {Boolean\|Object}}`|`false`| Whether comments shall be extracted to a separate file, (see [details](https://github.com/webpack/webpack/commit/71933e979e51c533b432658d5e37917f9e71595a), since webpack 2.3.0)|
57
+
|**`comments`**|`{Boolean\|RegExp\|Function<(node, comment) -> {Boolean}>}`| Defaults to preserving comments containing `/*!`, `/**!`, `@preserve` or `@license`. |Comment related configuration|
58
+
|**`extractComments`**|`{Boolean\|RegExp\|Function<(node, comment) -> {Boolean\|Object}>}`|`false`| Whether comments shall be extracted to a separate file, (see [details](https://github.com/webpack/webpack/commit/71933e979e51c533b432658d5e37917f9e71595a), since webpack 2.3.0)|
66
59
|**`sourceMap`**|`{Boolean}`|`false`|Use SourceMaps to map error message locations to modules. This slows down the compilation. ⚠️ **`cheap-source-map` options don't work with the plugin!**|
67
60
|**`test`**|`{RegExp\|Array<RegExp>}`| <code>/\.js($|\?)/i</code> |Test to match files against|
68
-
|**`include`**|`{RegExp\|Array<RegExp>}|`undefined`|Test only `include` files|
69
-
|**`exclude`**|`{RegExp\|Array<RegExp>}|`undefined`|Files to `exclude` from testing|
61
+
|**`include`**|`{RegExp\|Array<RegExp>}`|`undefined`|Test only `include` files|
62
+
|**`exclude`**|`{RegExp\|Array<RegExp>}`|`undefined`|Files to `exclude` from testing|
70
63
|**`warningsFilter`**|{`Function(source) -> {Boolean}}`|``|Allow to filter uglify warnings (since webpack 2.3.0)|
71
64
72
65
73
-
### `Mangling`
66
+
### `mangle`
74
67
75
68
`mangle (boolean|object)` - Passing `true` or an object enables and provides options for UglifyJS name mangling. See [UglifyJS documentation](https://github.com/mishoo/UglifyJS2/tree/v2.x#mangle) for mangle options. Example configuration, this will **not** mangle properties (see below):
76
69
@@ -97,7 +90,7 @@ new UglifyJsPlugin({
97
90
})
98
91
```
99
92
100
-
### `Extracting Comments`
93
+
### `extractComments`
101
94
102
95
The `extractComments` option can be
103
96
-`true`: All comments that normally would be preserved by the `comments` option will be moved to a separate file. If the original file is named `foo.js`, then the comments will be stored to `foo.js.LICENSE`
0 commit comments