-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
injectRegister: false still registers service worker #186
Comments
check if you are using any virtual pwa module; check also if you already have the sw registered (clear storage including the sw) => check your app in private browsing in your local (this way every time you close the browser the sw will be removed) |
I've tried clearing storage, unregistering the sw, opening in new incognito window, closing browser and re-opening, it's still registering. And I don't think I have any other pwa module installed, only
|
Upps, this is nuxt integration sorry. You can disable the plugin in the client options https://github.com/vite-pwa/nuxt/blob/main/src/types.ts#L7C3-L7C17 but then you won't have any utility. |
Thanks @userquin that worked. It no longer registers it. I created a composable to register the sw when visiting specific routes like this and add it to my
This seems to work and will only register the sw when visiting these routes. Is this a bad way of doing this though? Will there be any bad side-effects? @userquin |
You can use runtime caching + navigateFallbackDenylist instead (registering the sw via plugin), this way the sw will be always there. Check vite-pwa/sveltekit#65 and links in this comment vite-pwa/sveltekit#65 (comment) |
I'm trying to register my service worker manually so that it only gets registered when visiting specific URLs in my app. I've set
injectRegister: false
thinking it would not register the SW. But even so, and even if I don't install it manually, I can still see the service working being registered and pre-caching data in the dev tools?? How can I register it manually?This is the current config:
The text was updated successfully, but these errors were encountered: