Open finnbear opened 5 months ago
Hello, have you found any workaround for this issues?
Has anyone else found a solution for this?
i worked around this with the compat build
I used https://www.npmjs.com/package/@dimforge/rapier3d-compat as a workaround. The downside is it includes the Wasm binary as base64, which is less efficient for size and speed.
I used this plugin to import the
@dimforge/rapier3d
physics engine, which uses WebAssembly internally. Everything works as expected when I runnpm run dev
. However,npm run build
produces adist/
directory with a.wasm
file but noWebAssembly.instantiate*()
of any kind in the.js
file(s). As a result, an error is emitted the first time the nonexistent WebAssembly instance is accessed.Here is a reproducible example: https://github.com/finnbear/vite-plugin-wasm-bug
Thanks for making this plugin!