Skip to content

Commit bcbb036

Browse files
committedMar 6, 2018
fix(hooks): Call tapable.apply directly #879
1 parent eb0b765 commit bcbb036

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed
 

‎lib/compiler.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,11 @@ module.exports.compileTemplate = function compileTemplate (template, context, ou
4444
const compilerName = getCompilerName(context, outputFilename);
4545
const childCompiler = compilation.createChildCompiler(compilerName, outputOptions);
4646
childCompiler.context = context;
47-
childCompiler.apply(
48-
new NodeTemplatePlugin(outputOptions),
49-
new NodeTargetPlugin(),
50-
new LibraryTemplatePlugin('HTML_WEBPACK_PLUGIN_RESULT', 'var'),
51-
new SingleEntryPlugin(this.context, template),
52-
new LoaderTargetPlugin('node')
53-
);
47+
new NodeTemplatePlugin(outputOptions).apply(childCompiler);
48+
new NodeTargetPlugin().apply(childCompiler);
49+
new LibraryTemplatePlugin('HTML_WEBPACK_PLUGIN_RESULT', 'var').apply(childCompiler);
50+
new SingleEntryPlugin(this.context, template).apply(childCompiler);
51+
new LoaderTargetPlugin('node').apply(childCompiler);
5452

5553
// Fix for "Uncaught TypeError: __webpack_require__(...) is not a function"
5654
// Hot module replacement requires that every child compiler has its own

0 commit comments

Comments
 (0)
Please sign in to comment.