Skip to content

Commit e6530d4

Browse files
committed
fix empty context when LoaderOptionsPlugin is used as it wipes the context option
1 parent 22f6621 commit e6530d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ module.exports = function(content, map) {
9898
if(map.sources) {
9999
map.sources = map.sources.map(function(source) {
100100
source = source.split("!").pop();
101-
var p = path.relative(query.context || this.options.context, source).replace(/\\/g, "/");
101+
var p = path.relative(query.context || this.options.context || this.context, source).replace(/\\/g, "/");
102102
if(p.indexOf("../") !== 0)
103103
p = "./" + p;
104104
return "/" + p;

0 commit comments

Comments
 (0)