From 13fcb277f43b6a1654ce7fc46d02cff9ac1fd9f7 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 4 Dec 2024 18:10:49 +0000 Subject: [PATCH] Stop deleting build results during rebuilds This solves a problem with the webpack-dev-server, which would see the half-built javascript output and explode with a big error about `Can't resolve './pkg/matrix_sdk_crypto_wasm_bg.js'` --- CHANGELOG.md | 3 ++- scripts/build.sh | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 329ad657d..fafb88de1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ - The published package is now a proper dual CommonJS/ESM package. - The WebAssembly module is now loaded using `fetch` on Web platforms, reducing the bundle size significantly, as well as the time it takes to compile it. - ([#167](https://github.com/matrix-org/matrix-rust-sdk-crypto-wasm/pull/167)) + ([#167](https://github.com/matrix-org/matrix-rust-sdk-crypto-wasm/pull/167)), + ([#175](https://github.com/matrix-org/matrix-rust-sdk-crypto-wasm/pull/175)) **BREAKING CHANGES** diff --git a/scripts/build.sh b/scripts/build.sh index 2460b2fec..0911f4b74 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -9,8 +9,6 @@ cd "$(dirname "$0")"/.. WASM_PACK_ARGS="${WASM_PACK_ARGS:-}" -rm -rf pkg - # Generate the JavaScript bindings # --no-pack disables generation of a `package.json` file, as we're managing it ourselves. wasm-pack build --no-pack --target bundler --scope matrix-org --out-dir pkg --weak-refs "${WASM_PACK_ARGS}"