-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] library not being recognized/provided by vite #24
Comments
This message:
indicates that Vite is not loading a WASM file but an HTML file (possibly a 404 page). This situation is discussed in detail in this issue. Edit: Unfortunately I cannot give advice on how to configure Vite as I am not familiar with this environment, but this SO answer may be helpful; it solved a similar issue for SQL.js. In any case, this is not a bug of |
I wanted to know if I was doing something wrong, thank you for replying and also alerting me to the problem I've experienced and registering it for others. wasm-based library not being recognized/provided by vite #17334 |
Another way to solve this problem is to add it to vite.config.ts: export default defineConfig({
// others configs ...
optimizeDeps:{
exclude:["@undecaf/zbar-wasm"]
}// add this config
}); |
Describe the bug
I created react project with vite typescript.
My problem's is using the library @undecaf/zbar-wasm.
BarcodeScanner.jsx
My vite.config.ts
Errors
In my investigation I learned that vite does not provide .wasm .
My solution for the problem, which is not the preferred:
The .wasm is provided this way, but not through the library loader :
The text was updated successfully, but these errors were encountered: