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

Commit 07c57c1

Browse files
brentwiltonevilebottnawi
authored andcommitted
fix(index): set maxConcurrentCallsPerWorker to 1 (options.parallel) (#173)
* fix: set workerFarm maxConcurrentCallsPerWorker to 1 to allow Windows parallel builds * fix: Missing trailing comma lint error * fix(index): make maxConcurrentCallsPerWorker limit windows only
1 parent 786b332 commit 07c57c1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: src/uglify/index.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ export default class {
2626
}
2727

2828
if (this.maxConcurrentWorkers > 0) {
29-
this.workers = workerFarm({
30-
maxConcurrentWorkers: this.maxConcurrentWorkers,
31-
}, workerFile);
29+
const workerOptions = process.platform === 'win32' ? { maxConcurrentWorkers: this.maxConcurrentWorkers, maxConcurrentCallsPerWorker: 1 } : { maxConcurrentWorkers: this.maxConcurrentWorkers };
30+
this.workers = workerFarm(workerOptions, workerFile);
3231
this.boundWorkers = (options, cb) => this.workers(JSON.stringify(options, encode), cb);
3332
} else {
3433
this.boundWorkers = (options, cb) => {

0 commit comments

Comments
 (0)