-
Notifications
You must be signed in to change notification settings - Fork 28
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
Integration into browser broject using vite #21
Comments
Hi, It is great that you would like to contribute! Just fork the project and you can create PR from your forked repo. Here is the official document. Also I'm not sure what is the issue that you cannot use the current implementation. We have several issues discussed about using this in several frameworks. You may want to take a look. |
@cminkwitz did you figure out how to import this with Vite? |
@samsam2310 Can you help me figure out how to make this work with Vite?
gives me:
I've tried importing all the exported node_module files directly but can't figure it out. Any help? |
Reduced test case posted here: https://github.com/wesbos/vite-wasm |
Since the message is |
The fix for this ended up being to use the fork of this project that ships a ES Module version. https://www.npmjs.com/package/@undecaf/zbar-wasm I tried everything to get this one to work with Vite but I couldn't get it going. Vite is really cranky about importing URLs and I couldn't figure i tout. |
I recently came across this project. First of all thank you very much for the great work.
I had a little bit of trouble integrating it in a vue3 project. As Vue3 uses vite by default, i had some issues regarding the commonjs module structure that is generated using the current build method.
I think to use the -s MODULARIZE=1 was a very good idea. But using the .mjs output works even better. Vite also is capable of loading wasm files out of the box, so there is no need for the .bin hack.
I
createdtried to create a PR, but it seems i don't have the permissions to push a new branch. Mayby you could provide me with the permissions so i can push my code and could help to further improve the DX of the project.The text was updated successfully, but these errors were encountered: