Skip to content

Commit 61b4cca

Browse files
committed
fix: do not write wasm for inline mode
1 parent 835913c commit 61b4cca

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

crates/cli-support/src/lib.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,11 @@ impl Output {
659659
let wasm_name = format!("{}_bg", self.stem);
660660
let wasm_path = out_dir.join(&wasm_name).with_extension("wasm");
661661
fs::create_dir_all(out_dir)?;
662-
let wasm_bytes = self.module.emit_wasm();
663-
fs::write(&wasm_path, wasm_bytes)
664-
.with_context(|| format!("failed to write `{}`", wasm_path.display()))?;
665-
662+
if !self.generated.mode.inline_nodejs() {
663+
let wasm_bytes = self.module.emit_wasm();
664+
fs::write(&wasm_path, wasm_bytes)
665+
.with_context(|| format!("failed to write `{}`", wasm_path.display()))?;
666+
}
666667
let gen = &self.generated;
667668

668669
// Write out all local JS snippets to the final destination now that

0 commit comments

Comments
 (0)