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 legacy code (webpack =< v1.0.0) (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-ciniawsky authored Oct 24, 2017
1 parent 09705fb commit 0994334
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@ export function pitch(request) {
namedChunkFilename: null,
};

// TODO remove and triage eventual replacement via an option if needed
// doesn't work with webpack > v2.0.0
if (this.options && this.options.worker && this.options.worker.output) {
Object.keys(this.options.worker.output).forEach((name) => {
worker.options[name] = this.options.worker.output[name];
});
}

worker.compiler = this._compilation
.createChildCompiler('worker', worker.options);

Expand All @@ -68,12 +60,6 @@ export function pitch(request) {

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

// TODO remove and triage eventual replacement via an option if needed
// doesn't work with webpack > v2.0.0
if (this.options && this.options.worker && this.options.worker.plugins) {
this.options.worker.plugins.forEach(plugin => worker.compiler.apply(plugin));
}

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

worker.compiler.plugin('compilation', (compilation) => {
Expand Down

0 comments on commit 0994334

Please sign in to comment.