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 @@ -82,11 +82,6 @@ export default class OptimizePlugin {
8282 if ( this . options [ i ] == null ) this . options [ i ] = DEFAULT_OPTIONS [ i ] ;
8383 }
8484
85- this . workerPool = new WorkerPool ( {
86- workerPath : require . resolve ( './worker' ) ,
87- concurrency : this . options . concurrency
88- } ) ;
89-
9085 // const { concurrency } = options;
9186 // const workerPath = require.resolve('./worker');
9287 // if (concurrency === 0 || concurrency === false) {
@@ -456,6 +451,11 @@ export default class OptimizePlugin {
456451 }
457452
458453 apply ( compiler ) {
454+ this . workerPool = new WorkerPool ( {
455+ workerPath : require . resolve ( './worker' ) ,
456+ concurrency : this . options . concurrency
457+ } ) ;
458+
459459 compiler . hooks . compilation . tap ( NAME , compilation => {
460460 this . updateChunkHash ( compilation ) ;
461461
You can’t perform that action at this time.
0 commit comments