Skip to content

Commit

Permalink
fix: do not write wasm for inline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
torfmaster committed Sep 1, 2024
1 parent 8e2a73c commit cb8a1f1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/cli-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -630,10 +630,11 @@ impl Output {
let wasm_name = format!("{}_bg", self.stem);
let wasm_path = out_dir.join(&wasm_name).with_extension("wasm");
fs::create_dir_all(out_dir)?;
let wasm_bytes = self.module.emit_wasm();
fs::write(&wasm_path, wasm_bytes)
.with_context(|| format!("failed to write `{}`", wasm_path.display()))?;

if !self.generated.mode.inline_nodejs() {
let wasm_bytes = self.module.emit_wasm();
fs::write(&wasm_path, wasm_bytes)
.with_context(|| format!("failed to write `{}`", wasm_path.display()))?;
}
let gen = &self.generated;

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

0 comments on commit cb8a1f1

Please sign in to comment.