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

refactor(index): remove legacy code (webpack =< v1.0.0) #105

Merged
merged 1 commit into from
Oct 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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