feat(web): auto-update the PWA when a new release is deployed
Register the service worker from the app (virtual:pwa-register) instead of the injected script, so an installed PWA that stays open also checks for a new worker every 30 minutes, when it returns to the foreground and when the connection comes back. The new worker skips waiting, claims every tab and the page reloads into it, deferring the reload until the app is backgrounded if the user is typing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"target": "es2023",
|
||||
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
||||
"module": "esnext",
|
||||
"types": ["vite/client"],
|
||||
"types": ["vite/client", "vite-plugin-pwa/vanillajs"],
|
||||
"allowArbitraryExtensions": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user