-
Notifications
You must be signed in to change notification settings - Fork 11
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
[Feature Request] Having a parameter to set the WASM URL #20
Comments
not really, there's a PR proposing it, but I don't really like it, I recommend u use a static copy plugin |
Ok, no problem then. Thank you! |
@ThaUnknown Can you elaborate why, please? Having the wasm file hashed should make deployments easier when the file changes, as its hash gets reloaded. I don't think static copying is an elegant solution either, since you need further configuration in the building pipeline and the static assets are not counted towards the bundle size stats when using Vite to build. |
because you need to modify a lot in the emscripten build steps to keep the same "entry level" aka keep browser requirements low and be able to modify the path, and hate to break it to you but even with a custom path even if you magically change the WASM file during your development which is stupidly unlikely, it won't actually change the WASM, and EVEN IF you provided a custom path you'd still need to static copy the .wasm but with the hash... WASM isn't really a problem in not counting it towards the bundle size stats and it really shouldnt be |
@ThaUnknown I wasn't talking about development, ofc hashing on development is useless. My point was more towards production, where a version bump of your dependency where the WASM is also modified doesn't propagate in a deterministic way to clients, which might have cached versions. |
yeah that's fair, honestly I don't know what's the best way to solve this issue, I've never really seen or used any libraries which used workers so I don't really know what's the "go-to" for this kind of thing |
this was added in latest |
Hello,
As specified in #6, Vite bundles files with a hash. As
jassub
tries to load the WASM file from a static filename, loading it fails.Solutions are either using the static copy plugin or disabling hashing by Vite.
I'm wondering if it'd be possible to have a parameter, such as the
workerUrl
one, to pass the WASM URL?I've looked into the code, but I don't have the skills to see if it can be implemented as I don't have much experience with workers.
I don't mind if it's not implemented, just asking if it could be possible.
Thanks a lot!
The text was updated successfully, but these errors were encountered: