Trouble initializing wasm in SvelteKit

I am trying to use some of these @jsquash dependencies in a Pages app build with Sveltekit. I am able to get things building but when initializing the wasm during runtime, I get the following error:
Error: The 'credentials' field on 'RequestInitializerDict' is not implemented.
Error: The 'credentials' field on 'RequestInitializerDict' is not implemented.
I have searched the discord and seen some answers like "patch the module so it doesn't use credentials", and in this case it seems like vite's load is the thing using credentials. Has anybody had success using this or similar modules in SvelteKit on Pages and can give any advice? I've also tried the instructions here: https://github.com/jamsinclair/jSquash/blob/main/examples/cloudflare-worker-esm-format/src/index.js but those didn't work. Ideally I would make this work in SvelteKit itself and not need a separate worker, but that seems to be where this is leading. Thanks!
GitHub
jSquash/examples/cloudflare-worker-esm-format/src/index.js at main ...
Browser & Web Worker focussed wasm bundles derived from the Squoosh App. - jamsinclair/jSquash
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server