Skip to content

Commit 9b771bc

Browse files
committed
Fixing wasm path for loading
1 parent 13969a0 commit 9b771bc

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎playground/build.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bun
22
import plugin from "bun-plugin-tailwind";
33
import { existsSync } from "fs";
4-
import { rm } from "fs/promises";
4+
import { cp, rm } from "fs/promises";
55
import path from "path";
66

77
if (process.argv.includes("--help") || process.argv.includes("-h")) {
@@ -147,3 +147,11 @@ console.table(outputTable);
147147
const buildTime = (end - start).toFixed(2);
148148

149149
console.log(`\n✅ Build completed in ${buildTime}ms\n`);
150+
151+
const wasmSrcDir = path.join(process.cwd(), "src", "wasm");
152+
const wasmOutDir = path.join(outdir, "wasm");
153+
154+
if (existsSync(wasmSrcDir)) {
155+
await cp(wasmSrcDir, wasmOutDir, { recursive: true });
156+
console.log(`🧩 Copied WASM assets to ${wasmOutDir}\n`);
157+
}

0 commit comments

Comments
 (0)