-
Notifications
You must be signed in to change notification settings - Fork 457
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
Metadata
Metadata
Assignees
Labels
No labels