Add some documentation for the hmr fix
This commit is contained in:
parent
3da52a6001
commit
c4ee1738e7
|
|
@ -50,7 +50,11 @@ module.exports.compileTemplate = function compileTemplate(template, context, out
|
|||
new SingleEntryPlugin(this.context, template),
|
||||
new LoaderTargetPlugin('node')
|
||||
);
|
||||
childCompiler.plugin("compilation", function(compilation) {
|
||||
|
||||
// Fix for "Uncaught TypeError: __webpack_require__(...) is not a function"
|
||||
// Hot module replacement requires that every child compiler has its own
|
||||
// cache. @see https://github.com/ampedandwired/html-webpack-plugin/pull/179
|
||||
childCompiler.plugin('compilation', function(compilation) {
|
||||
if(compilation.cache) {
|
||||
if(!compilation.cache[compilerName])
|
||||
compilation.cache[compilerName] = {};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "html-webpack-plugin",
|
||||
"version": "2.6.3",
|
||||
"version": "2.6.4",
|
||||
"description": "Simplifies creation of HTML files to serve your webpack bundles",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
|
|
|
|||
Loading…
Reference in New Issue