From e6530d438484f6f5b26ef42d872f3c42f845030a Mon Sep 17 00:00:00 2001 From: pospi Date: Mon, 10 Oct 2016 16:22:51 +1000 Subject: [PATCH] fix empty context when LoaderOptionsPlugin is used as it wipes the context option --- lib/loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/loader.js b/lib/loader.js index 7574ba15..b8c97455 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -98,7 +98,7 @@ module.exports = function(content, map) { if(map.sources) { map.sources = map.sources.map(function(source) { source = source.split("!").pop(); - var p = path.relative(query.context || this.options.context, source).replace(/\\/g, "/"); + var p = path.relative(query.context || this.options.context || this.context, source).replace(/\\/g, "/"); if(p.indexOf("../") !== 0) p = "./" + p; return "/" + p;