Skip to content

Dev service worker on Firefox is not working #95

@fkrauthan

Description

@fkrauthan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions