From 5de74ba6c30afac6382fbad12078e0453d0aba87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Sun, 15 Sep 2024 15:42:03 +0100 Subject: [PATCH] [wasm] build: allow dev build --- um_wasm_loader/build.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/um_wasm_loader/build.js b/um_wasm_loader/build.js index d689266..df4efda 100644 --- a/um_wasm_loader/build.js +++ b/um_wasm_loader/build.js @@ -62,7 +62,8 @@ async function main() { const wasmDistDir = path.resolve(__dirname, 'dist'); await rm(wasmOutDir, { recursive: true, force: true }); const wasmRelOutDir = path.relative(wasmSourceDir, wasmOutDir); - await run(['wasm-pack', 'build', '--target', 'web', '--out-dir', wasmRelOutDir], { + const profileFlag = process.env.BUILD_RELEASE ? '--release' : '--dev'; + await run(['wasm-pack', 'build', profileFlag, '--target', 'web', '--out-dir', wasmRelOutDir], { cwd: path.resolve(__dirname, '..', 'um_wasm'), });