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
This commit is contained in:
Chris 2015-05-21 17:35:37 +01:00
parent ae6cfdb090
commit 8646d911d0
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
});