From 5cf60b361fde9911c2451038d7cf8e5c6bfd291e Mon Sep 17 00:00:00 2001 From: amoussa1229 <166072409+amoussa1229@users.noreply.github.com> Date: Wed, 1 Jul 2026 00:17:28 +0000 Subject: [PATCH] Switch PWA service worker to autoUpdate to avoid stale bundles after deploy VitePWA's registerType: 'prompt' kept the new service worker waiting indefinitely because no update-prompt UX was wired. Returning visitors kept receiving the old precached app shell and hashed chunks. 'autoUpdate' uses skipWaiting + clientsClaim so a deploy takes over on the next navigation. Refs: #86 --- ui/vite.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/vite.config.ts b/ui/vite.config.ts index 7b377067..4e2ea978 100644 --- a/ui/vite.config.ts +++ b/ui/vite.config.ts @@ -173,7 +173,7 @@ const config = defineConfig({ tanstackStart({ spa: { enabled: true } }), VitePWA({ injectRegister: false, - registerType: "prompt", + registerType: "autoUpdate", outDir: ".output/public", devOptions: { enabled: true,