We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
apply()
1 parent 15c02bb commit 0744e51Copy full SHA for 0744e51
1 file changed
src/index.js
@@ -82,11 +82,6 @@ export default class OptimizePlugin {
82
if (this.options[i] == null) this.options[i] = DEFAULT_OPTIONS[i];
83
}
84
85
- this.workerPool = new WorkerPool({
86
- workerPath: require.resolve('./worker'),
87
- concurrency: this.options.concurrency
88
- });
89
-
90
// const { concurrency } = options;
91
// const workerPath = require.resolve('./worker');
92
// if (concurrency === 0 || concurrency === false) {
@@ -456,6 +451,11 @@ export default class OptimizePlugin {
456
451
457
452
458
453
apply (compiler) {
454
+ this.workerPool = new WorkerPool({
455
+ workerPath: require.resolve('./worker'),
+ concurrency: this.options.concurrency
+ });
+
459
compiler.hooks.compilation.tap(NAME, compilation => {
460
this.updateChunkHash(compilation);
461
0 commit comments