Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

fix: init publicPath to undefined #159

Merged
merged 1 commit into from
Jun 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function(content) {
var configKey = query.config || "fileLoader";
var options = this.options[configKey] || {};
var config = {
publicPath: false,
publicPath: undefined,
useRelativePath: false,
name: "[hash].[ext]"
};
Expand Down Expand Up @@ -61,7 +61,7 @@ module.exports = function(content) {
}

var publicPath = "__webpack_public_path__ + " + JSON.stringify(url);
if (config.publicPath !== false) {
if (config.publicPath !== undefined) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!config.publicPath) {}

Maybe even 'safer', but enterily a nitpick

// support functions as publicPath to generate them dynamically
publicPath = JSON.stringify(
typeof config.publicPath === "function"
Expand Down