From b487c43f2f5c58b6267ad6d089a2c81f65dcf8f5 Mon Sep 17 00:00:00 2001 From: Levi Zim Date: Fri, 17 Jan 2025 20:36:17 +0800 Subject: [PATCH] fix: ensure wasm module matches frontend build Fix #100 --- tools/build-from-source/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/build-from-source/src/main.rs b/tools/build-from-source/src/main.rs index 3bccfaa..cb82dac 100644 --- a/tools/build-from-source/src/main.rs +++ b/tools/build-from-source/src/main.rs @@ -40,6 +40,11 @@ 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"]);