From 70259ea4b9a4e6d5fe44e783af571feaad00f6b9 Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Tue, 12 Jan 2016 09:30:32 +0100 Subject: [PATCH] Invalidate cache on error --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 37aded4..3966538 100644 --- a/index.js +++ b/index.js @@ -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) {