Invalidate cache on error

This commit is contained in:
Jan Nicklas 2016-01-12 09:30:32 +01:00 committed by Jan Nicklas
parent 1622c7d2e2
commit 70259ea4b9
1 changed files with 2 additions and 0 deletions

View File

@ -138,6 +138,8 @@ HtmlWebpackPlugin.prototype.apply = function(compiler) {
// In case anything went wrong the promise is resolved
// with the error message and an error is logged
compilation.errors.push(prettyError(err, compiler.context).toString());
// Prevent caching
self.hash = null;
return self.options.showErrors ? prettyError(err, compiler.context).toHtml() : 'ERROR';
})
.then(function(html) {