WASM Web Workers + Adapter Vercel? #13699
-
Hello, I am trying to deploy a SvelteKit page that uses a WASM application compiled with Emscripten. This WASM application uses PThreads/Web Workers. I have successfully built a page that works in development mode, but when running the build step (both locally and on Vercel), I get the following error:
My +page.svelte is fairly simple:
Any ideas on what I am doing wrong? I am suspecting it has something to do with code being executed on the client side that shouldn't be, but I also am not sure how this should be structured to make it work. I would appreciate any guidance and assistance that could be provided! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Well, I feel like a bit of a dummy, but leaving this here for anyone else who tries something like this. You need to compile your WASM with the following Emscripten compiler option: |
Beta Was this translation helpful? Give feedback.
Well, I feel like a bit of a dummy, but leaving this here for anyone else who tries something like this.
You need to compile your WASM with the following Emscripten compiler option:
-sENVIRONMENT=web,worker