From 3f0767ba6bb79b381bd1dd43e017dd1f77e73bfb Mon Sep 17 00:00:00 2001 From: Daniel Playfair Cal Date: Tue, 15 May 2018 20:23:17 +1000 Subject: [PATCH] fix: don't use a worker farm unless more than one process is required (#280) --- src/uglify/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uglify/index.js b/src/uglify/index.js index c04ae64e..75b0e218 100644 --- a/src/uglify/index.js +++ b/src/uglify/index.js @@ -25,7 +25,7 @@ export default class { return; } - if (this.maxConcurrentWorkers > 0) { + if (this.maxConcurrentWorkers > 1) { const workerOptions = process.platform === 'win32' ? { maxConcurrentWorkers: this.maxConcurrentWorkers, maxConcurrentCallsPerWorker: 1 } : { maxConcurrentWorkers: this.maxConcurrentWorkers }; this.workers = workerFarm(workerOptions, workerFile); this.boundWorkers = (options, cb) => this.workers(serialize(options), cb);