storj/web/satellite/scripts/build-wasm.sh
dlamarmorgan 94dcfd77ee Revert "web/satellite: allow execute permissions on wasm_exec"
This reverts commit 9022506292.

Reason for revert: Execute permissions are not required for this file. The error "Uncaught DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope':" was instead caused by a browser cached version of import returning an incorrect response.

Change-Id: Ib5f6bf30dc5a9919bb7d71fb2b04075486c74f89
2022-11-23 20:26:07 +00:00

14 lines
397 B
Bash
Executable File

#!/usr/bin/env bash
# Copy wasm javascript to match the go version
cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" ./static/wasm
# Compress wasm javascript using brotli
brotli -k -f ./static/wasm/wasm_exec.js
# Build wasm code
GOOS=js GOARCH=wasm go build -o ./static/wasm/access.wasm storj.io/storj/satellite/console/wasm
# Compress wasm code using brotli
brotli -k -f ./static/wasm/access.wasm