From 1e3a78dc6efa137be8fd9cbe06c0234dfd8972d2 Mon Sep 17 00:00:00 2001 From: Daniel Playfair Cal Date: Thu, 26 Apr 2018 10:57:07 +1000 Subject: [PATCH] Don't use a worker farm unless more than one process is required --- 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);