-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
update for Vite #4
Conversation
On a separate but related PR, I noticed that Hypothetically, if I wanted to use a separate web worker, would you know the solution to this? Don't waste too much time if you don't know - I really don't mind not having to spin up another worker. Just asking for the sake of completeness :) Edit: Updating Vite to |
Updating Vite to 5.1.6+ removes the need for |
@RReverser since this only adds a test case at this point, it should be unproblematic to rebase and merge. |
Thanks! |
Hi, thanks for a great library. This PR updates the Readme with instructions for Vite and adds Vite to the test suite.
Without
@surma/rollup-plugin-off-main-thread
, thevite build
command fails withHowever, with
@surma/rollup-plugin-off-main-thread
, the dev servernpx vite dev
causes the page to try to loadhttp://localhost:5173/pkg/snippets/wasm-bindgen-rayon-3e04391371ad0a8e/src/undefined
which obviously doesn't exist and results inFailed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
Possibly related.Therefore, we conditionally use
@surma/rollup-plugin-off-main-thread
based on Vite's "mode".