diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/webpack/lib/WebpackOptionsDefaulter.js | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) |
node_modules
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;
+ });
}
}
|