File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -88,11 +88,6 @@ export default class OptimizePlugin {
8888 if ( this . options [ i ] == null ) this . options [ i ] = DEFAULT_OPTIONS [ i ] ;
8989 }
9090
91- this . workerPool = new WorkerPool ( {
92- workerPath : require . resolve ( './worker' ) ,
93- concurrency : this . options . concurrency
94- } ) ;
95-
9691 // const { concurrency } = options;
9792 // const workerPath = require.resolve('./worker');
9893 // if (concurrency === 0 || concurrency === false) {
@@ -470,6 +465,11 @@ export default class OptimizePlugin {
470465 }
471466
472467 apply ( compiler ) {
468+ this . workerPool = new WorkerPool ( {
469+ workerPath : require . resolve ( './worker' ) ,
470+ concurrency : this . options . concurrency
471+ } ) ;
472+
473473 compiler . hooks . compilation . tap ( NAME , compilation => {
474474 this . updateChunkHash ( compilation ) ;
475475
You can’t perform that action at this time.
0 commit comments