mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 02:00:51 +00:00
Don't import wasm in generated JS if it's not used
Mostly just an edge case
This commit is contained in:
parent
0603faa57a
commit
247ea628fb
@ -410,7 +410,9 @@ impl<'a> Context<'a> {
|
||||
.unwrap_or("wasm_bindgen"),
|
||||
)
|
||||
} else {
|
||||
let import_wasm = if self.config.nodejs {
|
||||
let import_wasm = if self.globals.len() == 0 {
|
||||
String::new()
|
||||
} else if self.config.nodejs {
|
||||
self.footer
|
||||
.push_str(&format!("wasm = require('./{}_bg');", module_name));
|
||||
format!("var wasm;")
|
||||
|
Loading…
x
Reference in New Issue
Block a user