From 3f55437bfb8aa3baf331eaff18f53909ecd49a64 Mon Sep 17 00:00:00 2001 From: Kees Kluskens Date: Mon, 28 Sep 2015 23:48:54 +0200 Subject: [PATCH 1/2] Another try at fixing the public path. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 01ea85d..37072e3 100644 --- a/index.js +++ b/index.js @@ -335,7 +335,7 @@ HtmlWebpackPlugin.prototype.htmlWebpackPluginAssets = function(compilation, chun path.relative(path.dirname(self.options.filename), '.'); if (publicPath.length && publicPath.substr(-1, 1) !== '/') { - publicPath = urlModule.resolve(publicPath, '.') + '/'; + publicPath = path.join(urlModule.resolve(publicPath + '/', '.'), '/'); } var assets = { From a4c18b8c3027b1fb4e2fd9ff2f872d559663ffb3 Mon Sep 17 00:00:00 2001 From: Kees Kluskens Date: Tue, 29 Sep 2015 21:35:09 +0200 Subject: [PATCH 2/2] Remove url formatting in publicPath. --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 37072e3..90bd2b7 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,6 @@ var fs = require('fs'); var _ = require('lodash'); var Promise = require('bluebird'); var path = require('path'); -var urlModule = require('url'); Promise.promisifyAll(fs); var webpack = require('webpack'); @@ -335,7 +334,7 @@ HtmlWebpackPlugin.prototype.htmlWebpackPluginAssets = function(compilation, chun path.relative(path.dirname(self.options.filename), '.'); if (publicPath.length && publicPath.substr(-1, 1) !== '/') { - publicPath = path.join(urlModule.resolve(publicPath + '/', '.'), '/'); + publicPath += '/'; } var assets = {