Skip to content

Wasm initialization missing using npm run build #54

Open
@finnbear

Description

I used this plugin to import the @dimforge/rapier3d physics engine, which uses WebAssembly internally. Everything works as expected when I run npm run dev. However, npm run build produces a dist/ directory with a .wasm file but no WebAssembly.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

image

Thanks for making this plugin!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions