Skip to content

Commit

Permalink
fix: ensure wasm module matches frontend build
Browse files Browse the repository at this point in the history
  • Loading branch information
kxxt committed Jan 19, 2025
1 parent 8402d83 commit 5eee90d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/build-from-source/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ fn main() -> anyhow::Result<()> {
let dst = project.join("assets/artifacts/book.mjs");
std::fs::copy(src, dst)?;

// copy typst ts renderer wasm module
let src =
project.join("node_modules/@myriaddreamin/typst-ts-renderer/pkg/typst_ts_renderer_bg.wasm");
let dst = project.join("assets/artifacts/typst_ts_renderer_bg.wasm");
std::fs::copy(src, dst)?;

println!("Running cargo build...");
let mut cmd = Command::new("cargo");
cmd.args(["build", "--release"]);
Expand Down

0 comments on commit 5eee90d

Please sign in to comment.