Merge pull request #8448 from sodatea/wasm-resolve

fix: `.wasm` extension should have lower priority when resolving modules
This commit is contained in:
Tobias Koppers 2018-12-05 12:36:11 +01:00 committed by GitHub
commit e5e648061c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -18,10 +18,10 @@ class DelegatedModuleFactoryPlugin {
options.type = options.type || "require";
options.extensions = options.extensions || [
"",
".wasm",
".mjs",
".js",
".json"
".json",
".wasm"
];
}

View File

@ -344,7 +344,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
this.set("resolve", "call", value => Object.assign({}, value));
this.set("resolve.cache", "make", options => !!options.cache);
this.set("resolve.modules", ["node_modules"]);
this.set("resolve.extensions", [".wasm", ".mjs", ".js", ".json"]);
this.set("resolve.extensions", [".mjs", ".js", ".json", ".wasm"]);
this.set("resolve.mainFiles", ["index"]);
this.set("resolve.aliasFields", "make", options => {
if (