Skip to content

Commit

Permalink
fix(compiler): Fallback to 3.0.7 because of #900
Browse files Browse the repository at this point in the history
  • Loading branch information
jantimon committed Mar 22, 2018
1 parent efbd352 commit 05ee29b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ module.exports.compileTemplate = function compileTemplate (template, context, ou
new NodeTemplatePlugin(outputOptions).apply(childCompiler);
new NodeTargetPlugin().apply(childCompiler);
new LibraryTemplatePlugin('HTML_WEBPACK_PLUGIN_RESULT', 'var').apply(childCompiler);
new SingleEntryPlugin(this.context, template, compilerName).apply(childCompiler);

// Using undefined as name for the SingleEntryPlugin causes a unexpected output as described in
// https://github.com/jantimon/html-webpack-plugin/issues/895
// Using a string as a name for the SingleEntryPlugin causes problems with HMR as described in
// https://github.com/jantimon/html-webpack-plugin/issues/900
// Until the HMR issue is fixed we keep the ugly output:
new SingleEntryPlugin(this.context, template, undefined).apply(childCompiler);

new LoaderTargetPlugin('node').apply(childCompiler);

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

0 comments on commit 05ee29b

Please # to comment.