mirror of https://github.com/webpack/webpack.git
				
				
				
			Merge pull request #8448 from sodatea/wasm-resolve
fix: `.wasm` extension should have lower priority when resolving modules
This commit is contained in:
		
						commit
						e5e648061c
					
				|  | @ -18,10 +18,10 @@ class DelegatedModuleFactoryPlugin { | |||
| 		options.type = options.type || "require"; | ||||
| 		options.extensions = options.extensions || [ | ||||
| 			"", | ||||
| 			".wasm", | ||||
| 			".mjs", | ||||
| 			".js", | ||||
| 			".json" | ||||
| 			".json", | ||||
| 			".wasm" | ||||
| 		]; | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
|  | @ -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 ( | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue