This repository was archived by the owner on Dec 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 3737 "dependencies" : {
3838 "cacache" : " ^11.3.2" ,
3939 "find-cache-dir" : " ^2.1.0" ,
40+ "is-wsl" : " ^1.1.0" ,
4041 "schema-utils" : " ^1.0.0" ,
4142 "serialize-javascript" : " ^1.7.0" ,
4243 "source-map" : " ^0.6.1" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import cacache from 'cacache';
44import findCacheDir from 'find-cache-dir' ;
55import workerFarm from 'worker-farm' ;
66import serialize from 'serialize-javascript' ;
7+ import isWsl from 'is-wsl' ;
78
89import minify from './minify' ;
910
@@ -19,10 +20,11 @@ export default class TaskRunner {
1920 // In some cases cpus() returns undefined
2021 // https://github.com/nodejs/node/issues/19022
2122 const cpus = os . cpus ( ) || { length : 1 } ;
22- this . maxConcurrentWorkers =
23- parallel === true
24- ? cpus . length - 1
25- : Math . min ( Number ( parallel ) || 0 , cpus . length - 1 ) ;
23+ this . maxConcurrentWorkers = isWsl
24+ ? 1
25+ : parallel === true
26+ ? cpus . length - 1
27+ : Math . min ( Number ( parallel ) || 0 , cpus . length - 1 ) ;
2628 }
2729
2830 run ( tasks , callback ) {
You can’t perform that action at this time.
0 commit comments