webassembly icon indicating copy to clipboard operation
webassembly copied to clipboard

Cannot use relative URL with global fetch

Open jonshipmansmc opened this issue 2 years ago • 0 comments

Using SvelteKit inside vite as a plugin.

Internal server error: Cannot use relative URL (C:\Users\jon\Repositories\frontend\node_modules@saschazar\wasm-webp/wasm_webp.wasm) with global fetch — use event.fetch instead: https://kit.svelte.dev/docs/web-standards#fetch-apis

I tried to figure out the relative URL in the source but was unable to. Should be a simple fix of path.resolve serverside for importing the wasm file.

jonshipmansmc avatar Mar 20 '23 16:03 jonshipmansmc