Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

Commit

Permalink
refactor(index): remove Tapable.apply calls (#121)
Browse files Browse the repository at this point in the history
* Remove Tapable.apply calls

* chore: add code comment for clarity, trigger circle
  • Loading branch information
ooflorent authored and shellscape committed Apr 23, 2018
1 parent c4c00e5 commit 04bc4ff
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ export function pitch(request) {
worker.compiler = this._compilation
.createChildCompiler('worker', worker.options);

worker.compiler.apply(new WebWorkerTemplatePlugin(worker.options));
// Tapable.apply is deprecated in [email protected].
// The plugins should now call apply themselves.
new WebWorkerTemplatePlugin(worker.options).apply(worker.compiler);

if (this.target !== 'webworker' && this.target !== 'web') {
worker.compiler.apply(new NodeTargetPlugin());
new NodeTargetPlugin().apply(worker.compiler);
}

worker.compiler.apply(new SingleEntryPlugin(this.context, `!!${request}`, 'main'));
new SingleEntryPlugin(this.context, `!!${request}`, 'main').apply(worker.compiler);

const subCache = `subcache ${__dirname} ${request}`;

Expand Down

0 comments on commit 04bc4ff

Please sign in to comment.