Skip to content
This repository was archived by the owner on Dec 5, 2019. It is now read-only.

Commit ee16639

Browse files
auimichael-ciniawsky
authored andcommitted
feat: add support for parallelization && caching (options.parallel) (#77)
1 parent dabadbc commit ee16639

19 files changed

+1306
-621
lines changed

Diff for: README.md

+9
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ This plugin supports UglifyJS features as discussed below:
6363
| include | RegExp, Array<RegExp> | | Test only `include` files. |
6464
| exclude | RegExp, Array<RegExp> | | Files to `exclude` from testing. |
6565
| warningsFilter | function(source) -> boolean | | Allow to filter uglify warnings (since webpack 2.3.0) |
66+
| parallel | boolean, object | false | Use multi-process parallel running and file cache to improve the build speed. |
6667

6768
<h2 align="center">Mangling</h2>
6869

@@ -103,6 +104,14 @@ The `extractComments` option can be
103104
- `banner`: The banner text that points to the extracted file and will be added on top of the original file. will be added to the original file. Can be `false` (no banner), a `string`, or a `function (string) -> string` that will be called with the filename where extracted comments have been stored. Will be wrapped into comment.
104105
Default: `/*! For license information please see foo.js.LICENSE */`
105106

107+
<h2 align="center">Run in parallel</h2>
108+
109+
The `parallel` option can be
110+
111+
- `true`: Enable multi-process parallel running with file cache
112+
- an `object` consisting of the following keys, all optional:
113+
- `workers`: The maximum number of concurrent runs. If it is `true`, it is equal to `require('os').cpus().length - 1`.
114+
- `cache`: Enable file caching. If it is `true`, it is equal to `"node_modules/.cache/uglifyjs-webpack-plugin"`.
106115

107116
<h2 align="center">Maintainers</h2>
108117

0 commit comments

Comments
 (0)