-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev service worker on Firefox is not working #95
Comments
You cannot use custom sw with type module in Firefox, it is not supported. |
Hmm but changing |
Because cannot use
Check the source code in the network or source tab. |
Ah so in general dev mode for service workers does not work right now for firefox. Might be worth pointing out in the docs (as it only calls out that |
You can write your custom service worker using |
https://vite-pwa-org.netlify.app/guide/development.html#injectmanifest-strategy |
Yeah to me that reads as I can use |
I've configured the service worker to use
strategies: "injectManifest",
and created the minimal service worker code required. My dev section looks as follow:However when running my sveltekit app in dev mode (
pnpm run dev
) and opening the page on Firefox I get aSW 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.
The text was updated successfully, but these errors were encountered: