Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 77daf83

Browse files
sokrajoshwiens
authored andcommitted
refactor: pass a unique compiler name to get child compilation (#483)
This is recommended after webpack/webpack#4704
1 parent dd43832 commit 77daf83

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

loader.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,12 @@ module.exports.pitch = function(request) {
4747
filename: childFilename,
4848
publicPath: publicPath
4949
};
50-
var childCompiler = this._compilation.createChildCompiler("extract-text-webpack-plugin", outputOptions);
50+
var childCompiler = this._compilation.createChildCompiler("extract-text-webpack-plugin " + NS + " " + request, outputOptions);
5151
childCompiler.apply(new NodeTemplatePlugin(outputOptions));
5252
childCompiler.apply(new LibraryTemplatePlugin(null, "commonjs2"));
5353
childCompiler.apply(new NodeTargetPlugin());
5454
childCompiler.apply(new SingleEntryPlugin(this.context, "!!" + request));
5555
childCompiler.apply(new LimitChunkCountPlugin({ maxChunks: 1 }));
56-
var subCache = "subcache " + NS + " " + request; // eslint-disable-line no-path-concat
57-
childCompiler.plugin("compilation", function(compilation) {
58-
if(compilation.cache) {
59-
if(!compilation.cache[subCache])
60-
compilation.cache[subCache] = {};
61-
compilation.cache = compilation.cache[subCache];
62-
}
63-
});
6456
// We set loaderContext[NS] = false to indicate we already in
6557
// a child compiler so we don't spawn another child compilers from there.
6658
childCompiler.plugin("this-compilation", function(compilation) {

0 commit comments

Comments
 (0)