Add some documentation for the hmr fix

This commit is contained in:
Jan Nicklas 2016-01-19 07:38:21 +01:00
parent 3da52a6001
commit c4ee1738e7
2 changed files with 6 additions and 2 deletions

View File

@ -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] = {};

View File

@ -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": [