Hey there! I see that your post is 1 year old, but I'm very much interested in getting Svelte and WASM to work together. Was your webpack problem the same as mine, in that the Svelte webpack version is 5.x.x which does not support WASM by default? If so, have you tried finding compatible dependency configs that work? I'm about to go down that road and just wanted to know if it's worth giving it a shot or I'm just wasting my time
I decided to try it in the meantime all the same. After some trial and error, managed to get it to work. Managed to pack it in Electron+Vite too! I recommend Vite over Webpack, Vite has a plugin for wasm that is relatively pain free!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey there! I see that your post is 1 year old, but I'm very much interested in getting Svelte and WASM to work together. Was your webpack problem the same as mine, in that the Svelte webpack version is 5.x.x which does not support WASM by default? If so, have you tried finding compatible dependency configs that work? I'm about to go down that road and just wanted to know if it's worth giving it a shot or I'm just wasting my time
TBH I have not tried since then to make it work, I may try again sometime soon but no promises
I decided to try it in the meantime all the same. After some trial and error, managed to get it to work. Managed to pack it in Electron+Vite too! I recommend Vite over Webpack, Vite has a plugin for wasm that is relatively pain free!