Merge pull request #1646 from ibaryshnikov/explicit-extension

Added explicit extension for imported .wasm file for --target bundler
This commit is contained in:
Alex Crichton 2019-07-08 10:51:25 -05:00 committed by GitHub
commit 16fc0596eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -284,7 +284,7 @@ impl<'a> Context<'a> {
| OutputMode::Node {
experimental_modules: true,
} => {
imports.push_str(&format!("import * as wasm from './{}_bg';\n", module_name));
imports.push_str(&format!("import * as wasm from './{}_bg.wasm';\n", module_name));
for (id, js) in sorted_iter(&self.wasm_import_definitions) {
let import = self.module.imports.get_mut(*id);
import.module = format!("./{}.js", module_name);