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

Commit

Permalink
fix(index): set maxConcurrentCallsPerWorker to 1 (`options.parallel…
Browse files Browse the repository at this point in the history
…`) (#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
  • Loading branch information
brentwilton authored and evilebottnawi committed Nov 23, 2017
1 parent 786b332 commit 07c57c1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/uglify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ export default class {
}

if (this.maxConcurrentWorkers > 0) {
this.workers = workerFarm({
maxConcurrentWorkers: this.maxConcurrentWorkers,
}, workerFile);
const workerOptions = process.platform === 'win32' ? { maxConcurrentWorkers: this.maxConcurrentWorkers, maxConcurrentCallsPerWorker: 1 } : { maxConcurrentWorkers: this.maxConcurrentWorkers };
this.workers = workerFarm(workerOptions, workerFile);
this.boundWorkers = (options, cb) => this.workers(JSON.stringify(options, encode), cb);
} else {
this.boundWorkers = (options, cb) => {
Expand Down

0 comments on commit 07c57c1

Please sign in to comment.