build public path with correct hash value

This commit is contained in:
Sandeep Arneja 2016-03-09 17:45:42 -05:00
parent 07d410d477
commit 419c2e6121
1 changed files with 1 additions and 1 deletions

View File

@ -338,7 +338,7 @@ HtmlWebpackPlugin.prototype.htmlWebpackPluginAssets = function (compilation, chu
// Use the configured public path or build a relative path
var publicPath = typeof compilation.options.output.publicPath !== 'undefined'
? compilation.options.output.publicPath
? compilation.mainTemplate.getPublicPath({hash: webpackStatsJson.hash})
: path.relative(path.dirname(self.options.filename), '.').split(path.sep).join('/');
if (publicPath.length && publicPath.substr(-1, 1) !== '/') {