diff options
Diffstat (limited to 'node_modules/webpack/lib/WebpackOptionsDefaulter.js')
-rw-r--r-- | node_modules/webpack/lib/WebpackOptionsDefaulter.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/node_modules/webpack/lib/WebpackOptionsDefaulter.js b/node_modules/webpack/lib/WebpackOptionsDefaulter.js index 48d8d472d..24bb42321 100644 --- a/node_modules/webpack/lib/WebpackOptionsDefaulter.js +++ b/node_modules/webpack/lib/WebpackOptionsDefaulter.js @@ -28,6 +28,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { this.set("module.wrappedContextRecursive", true);
this.set("module.wrappedContextCritical", false);
this.set("module.strictExportPresence", false);
+ this.set("module.strictThisContextOnImports", false);
this.set("module.unsafeCache", true);
@@ -84,6 +85,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { this.set("resolve.unsafeCache", true);
this.set("resolve.modules", ["node_modules"]);
this.set("resolve.extensions", [".js", ".json"]);
+ this.set("resolve.mainFiles", ["index"]);
this.set("resolve.aliasFields", "make", (options) => {
if(options.target === "web" || options.target === "webworker")
return ["browser"];
@@ -96,10 +98,17 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { else
return ["module", "main"];
});
+ this.set("resolve.cacheWithContext", "make", (options) => {
+ return Array.isArray(options.resolve.plugins) && options.resolve.plugins.length > 0;
+ });
this.set("resolveLoader", {});
this.set("resolveLoader.unsafeCache", true);
this.set("resolveLoader.mainFields", ["loader", "main"]);
this.set("resolveLoader.extensions", [".js", ".json"]);
+ this.set("resolveLoader.mainFiles", ["index"]);
+ this.set("resolveLoader.cacheWithContext", "make", (options) => {
+ return Array.isArray(options.resolveLoader.plugins) && options.resolveLoader.plugins.length > 0;
+ });
}
}
|