Use a separate cache for the child compilation.
Sharing the cache cause bad issues with wrong module ids.
This commit is contained in:
parent
9e7cc462ba
commit
b42074844c
|
|
@ -50,6 +50,13 @@ module.exports.compileTemplate = function compileTemplate(template, context, out
|
|||
new SingleEntryPlugin(this.context, template),
|
||||
new LoaderTargetPlugin('node')
|
||||
);
|
||||
childCompiler.plugin("compilation", function(compilation) {
|
||||
if(compilation.cache) {
|
||||
if(!compilation.cache[compilerName])
|
||||
compilation.cache[compilerName] = {};
|
||||
compilation.cache = compilation.cache[compilerName];
|
||||
}
|
||||
});
|
||||
|
||||
// Compile and return a promise
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue