-
-
Notifications
You must be signed in to change notification settings - Fork 17
Description
I've configured the service worker to use strategies: "injectManifest", and created the minimal service worker code required. My dev section looks as follow:
devOptions: {
enabled: true,
type: "module",
},
However when running my sveltekit app in dev mode (pnpm run dev) and opening the page on Firefox I get a SW registration error TypeError: ServiceWorker script at http://localhost:5173/dev-sw.js?dev-sw for scope http://localhost:5173/ threw an exception during script evaluation. [PWA.svelte:23:18](http://localhost:5173/src/lib/components/PWA.svelte) error (without any additonal errors displayed in the console).
Opening the same page in for example Chrome registers the service worker correctly.
You can use this repository https://github.com/fkrauthan/sveltekit-pwa-issue to see this issue yourself.