diff --git a/index.js b/index.js index 7838ba1..3d4ff60 100644 --- a/index.js +++ b/index.js @@ -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) !== '/') {