mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-14 11:05:32 -04:00
Copy unbase64.js into the right place
This commit is contained in:
@@ -23,10 +23,13 @@ RUSTFLAGS='-C opt-level=z' WASM_BINDGEN_WEAKREF=1 wasm-pack build --release --ta
|
||||
echo '`;'
|
||||
} > pkg/matrix_sdk_crypto_js_bg.wasm.js
|
||||
|
||||
# copy in the unbase64 module
|
||||
cp unbase64.js pkg/
|
||||
|
||||
# In the javascript:
|
||||
# 1. replace the lines that load the wasm
|
||||
# 2. remove the imports of TextDecoder and TextEncoder. We rely on the global defaults.
|
||||
loadwasm='const bytes = require("../unbase64.js")(require("./matrix_sdk_crypto_js_bg.wasm.js"));'
|
||||
loadwasm='const bytes = require("./unbase64.js")(require("./matrix_sdk_crypto_js_bg.wasm.js"));'
|
||||
sed -i -e "/^const path = /,+1 c$loadwasm" \
|
||||
-e '/= require(`util`)/d' \
|
||||
pkg/matrix_sdk_crypto_js.js
|
||||
|
||||
Reference in New Issue
Block a user