From 105323442654c6187dd3cdacad38f043926a148b Mon Sep 17 00:00:00 2001 From: Eric Burel Date: Tue, 13 Feb 2018 11:41:21 +0100 Subject: [PATCH] Sensible default for publicPath I am not at all a webpack expert, so this change may not be appropriate. However when writing my own config, I did not need a public path, default being '/'. So I think we should rely on this default when computing the component path (but once again I am not a webpack expert). --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 0c506ad..5d77ff8 100644 --- a/src/index.js +++ b/src/index.js @@ -25,8 +25,8 @@ module.exports = function(htmlFileContent) { const outputPath = parsedQuery.outputPath == null ? this.options.output.path - : parsedQuery.outputPath - + : '/' + const outputPublicPath = parsedQuery.outputPublicPath == null ? this.options.output.publicPath : parsedQuery.outputPublicPath @@ -141,4 +141,4 @@ const getMinifiedOutput = (filePath, code) => { else if (filePath.endsWith('.js')) { return uglifyJs.minify(code, { fromString: true }).code } -} \ No newline at end of file +}