You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
This is not a bug in Vite. Because vim.wasm (emscripten output) uses a dynamic url to fetch the .wasm/.data file, Vite cannot detect that and cannot bundle those files. It works in dev just because the files happens to be served where vim.wasm expects.
One workaround is to use Module.locateFile. But vim.wasm doesn't expose that function and we cannot use this function.
Another workaround is to use vite-plugin-static-copy and copy the .wasm/.data files to where vim.wasm expects.
Describe the bug
My project essentially does:
This works great in development mode, but in production I get 404, these assets aren't found
Dev:
Prod:
I can't find any trace of them in the dist directory
Reproduction
https://github.com/ayroblu/wasm-import-bug
Steps to reproduce
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: