-
Notifications
You must be signed in to change notification settings - Fork 472
Open
Description
🐛 Bug description
I've got a typescript module written on top of wasm bindings from rust. With wasm-pack build --target bundler I can run tests and everything works correctly. But if I change target to web and add await init(); on top of my module I get errors
FAIL test/types.test.ts [ test/types.test.ts ]
TypeError: fetch failed
❯ __wbg_init pkg/cooklang_wasm.js:577:51
575| __wbg_init_memory(imports);
576|
577| const { instance, module } = await __wbg_load(await module_or_path, imports);
| ^
578|
579| return __wbg_finalize_init(instance, module);
❯ index.ts:24:1
❯ test/types.test.ts:2:1
Caused by: Error: not implemented... yet...
❯ __wbg_init pkg/cooklang_wasm.js:572:26
❯ index.ts:24:7
🤔 Expected Behavior
My tests pass.
👟 Steps to reproduce
Use --target web, add import init from "pkg/some_package.js"; await init(); and run vitest importing the module.
🌍 Your environment
wasm-pack version: 0.13.1
rustc version: 1.88.0
ryaneverett33
Metadata
Metadata
Assignees
Labels
No labels