Skip to content

Commit 7a1757e

Browse files
committed
build: ts: handle wasm asset manually
index.web.ts imported the wasm module which let bun build automaticall handle the wasm file as an asset. After removing the index.web.ts imports we now have to copy the wasm file manually.
1 parent 271abfa commit 7a1757e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,10 @@ $(JS_OUT): $(js-deps)
499499
--target browser \
500500
--format esm \
501501
--outdir out \
502-
--asset-naming "[dir]/[name].[ext]" \
503-
--entry-naming "corecrypto.[ext]"
502+
--entry-naming "corecrypto.[ext]" && \
503+
mkdir -p out/autogenerated/ && \
504+
mkdir -p out/autogenerated/wasm-bindgen && \
505+
cp src/autogenerated/wasm-bindgen/index_bg.wasm out/autogenerated/wasm-bindgen/
504506

505507
.PHONY: js
506508
js: $(JS_OUT)

0 commit comments

Comments
 (0)