mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-15 09:40:52 +00:00
This needed and update now that we're explicitly importing `*.wasm` to import `*.js` instead. Additionally this was moved over to the `web` target to avoid needing Webpack Closes #1743
15 lines
305 B
Bash
Executable File
15 lines
305 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -ex
|
|
|
|
# Compile our wasm module and run `wasm-bindgen`
|
|
wasm-pack build --target web
|
|
|
|
# Run the `wasm2js` tool from `binaryen`
|
|
wasm2js pkg/wasm2js_bg.wasm -o pkg/wasm2js_bg.js
|
|
|
|
# Update our JS shim to require the JS file instead
|
|
sed -i 's/wasm2js_bg.wasm/wasm2js_bg.js/' pkg/wasm2js.js
|
|
|
|
http
|