From 8646d911d0e6c3ee013def047b1e41c030ec091d Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 21 May 2015 17:35:37 +0100 Subject: [PATCH] Fixes error reporting Fixes error reporting so that instead of: Error in undefined We get: Error in HtmlWebPackPlugin: htmlWebpackPlugin.assets is deprecated - please use htmlWebpackPlugin.files instead --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 83fda82..c2fe8aa 100644 --- a/index.js +++ b/index.js @@ -36,7 +36,7 @@ HtmlWebpackPlugin.prototype.apply = function(compiler) { var assets = self.htmlWebpackPluginLegacyAssets(compilation, webpackStatsJson); Object.defineProperty(templateParams.htmlWebpackPlugin, 'assets', { get: function() { - compilation.errors.push('htmlWebpackPlugin.assets is deprecated - please use htmlWebpackPlugin.files instead'); + compilation.errors.push(new Error('HtmlWebPackPlugin: htmlWebpackPlugin.assets is deprecated - please use htmlWebpackPlugin.files instead')); return assets; } });