We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 59fa989 + d366578 commit 180359dCopy full SHA for 180359d
1 file changed
src/index.js
@@ -88,11 +88,6 @@ export default class OptimizePlugin {
88
if (this.options[i] == null) this.options[i] = DEFAULT_OPTIONS[i];
89
}
90
91
- this.workerPool = new WorkerPool({
92
- workerPath: require.resolve('./worker'),
93
- concurrency: this.options.concurrency
94
- });
95
-
96
// const { concurrency } = options;
97
// const workerPath = require.resolve('./worker');
98
// if (concurrency === 0 || concurrency === false) {
@@ -470,6 +465,11 @@ export default class OptimizePlugin {
470
465
471
466
472
467
apply (compiler) {
468
+ this.workerPool = new WorkerPool({
469
+ workerPath: require.resolve('./worker'),
+ concurrency: this.options.concurrency
+ });
+
473
compiler.hooks.compilation.tap(NAME, compilation => {
474
this.updateChunkHash(compilation);
475
0 commit comments