From 15f7b960e5ac093166199431171c0436b4c899bb Mon Sep 17 00:00:00 2001 From: Malte Legenhausen Date: Fri, 3 Feb 2017 15:06:14 +0100 Subject: [PATCH] Allow the usage of an empty string as publicPath This pull request enforces a more strict check of `publicPath` to prevent the interpretation of empty string as false value. This allows to disable the prefixing of `publicPath` with `__webpack_public_path__` without the need to provide a function that simply returns the `url` as given. Current work around would be to use ```js query: { publicPath: (url) => url } ``` --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index bb95093..9584809 100644 --- a/index.js +++ b/index.js @@ -44,7 +44,7 @@ module.exports = function(content) { : config.outputPath + url } - if (config.publicPath) { + if (config.publicPath !== false) { // support functions as publicPath to generate them dynamically publicPath = JSON.stringify( typeof config.publicPath === "function"