[wasm] build: allow dev build

This commit is contained in:
鲁树人 2024-09-15 15:42:03 +01:00
parent 7ac92f9341
commit 5de74ba6c3

View File

@ -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'),
});