Skip to content

Commit c572c15

Browse files
authored
Merge pull request #11831 from Pyrolistical/patch-1
Fixed resolve.roots default value
2 parents 2efeb4b + 811395e commit c572c15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/WebpackOptionsDefaulter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,13 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
356356
options.resolve.plugins.length > 0
357357
);
358358
});
359+
this.set("resolve.roots", "make", options => [options.context]);
359360

360361
this.set("resolveLoader", "call", value => Object.assign({}, value));
361362
this.set("resolveLoader.unsafeCache", true);
362363
this.set("resolveLoader.mainFields", ["loader", "main"]);
363364
this.set("resolveLoader.extensions", [".js", ".json"]);
364365
this.set("resolveLoader.mainFiles", ["index"]);
365-
this.set("resolveLoader.roots", "make", options => [options.context]);
366366
this.set("resolveLoader.cacheWithContext", "make", options => {
367367
return (
368368
Array.isArray(options.resolveLoader.plugins) &&

0 commit comments

Comments
 (0)