Skip to content

Commit 05ee29b

Browse files
committedMar 22, 2018
fix(compiler): Fallback to 3.0.7 because of #900
1 parent efbd352 commit 05ee29b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
 

‎lib/compiler.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@ module.exports.compileTemplate = function compileTemplate (template, context, ou
4646
new NodeTemplatePlugin(outputOptions).apply(childCompiler);
4747
new NodeTargetPlugin().apply(childCompiler);
4848
new LibraryTemplatePlugin('HTML_WEBPACK_PLUGIN_RESULT', 'var').apply(childCompiler);
49-
new SingleEntryPlugin(this.context, template, compilerName).apply(childCompiler);
49+
50+
// Using undefined as name for the SingleEntryPlugin causes a unexpected output as described in
51+
// https://github.com/jantimon/html-webpack-plugin/issues/895
52+
// Using a string as a name for the SingleEntryPlugin causes problems with HMR as described in
53+
// https://github.com/jantimon/html-webpack-plugin/issues/900
54+
// Until the HMR issue is fixed we keep the ugly output:
55+
new SingleEntryPlugin(this.context, template, undefined).apply(childCompiler);
56+
5057
new LoaderTargetPlugin('node').apply(childCompiler);
5158

5259
// Fix for "Uncaught TypeError: __webpack_require__(...) is not a function"

0 commit comments

Comments
 (0)
Please sign in to comment.