refactor: optimize WASM build command in Taskfile by adding ldflags for smaller output

This commit is contained in:
2025-12-30 12:09:35 -06:00
parent 4d6eda36c0
commit cbff6e4bc4

View File

@@ -177,9 +177,7 @@ tasks:
CGO_ENABLED: '0'
cmds:
- mkdir -p {{.BUILD_DIR}}
- 'GOOS=js GOARCH=wasm {{.GOCMD}} build -o {{.BUILD_DIR}}/{{.BINARY_NAME}}.wasm {{.MAIN_PACKAGE}}'
- mkdir -p examples/wasm/static
- cp {{.BUILD_DIR}}/{{.BINARY_NAME}}.wasm examples/wasm/static/reticulum-go.wasm
- 'GOOS=js GOARCH=wasm {{.GOCMD}} build -ldflags="-s -w" -o {{.BUILD_DIR}}/{{.BINARY_NAME}}.wasm {{.MAIN_PACKAGE}}'
build-wasm-example:
desc: Build WebAssembly example