mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-07 16:19:09 +00:00
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
This commit is contained in:
parent
fb9f1901d4
commit
5cf60b361f
1 changed files with 1 additions and 1 deletions
|
|
@ -173,7 +173,7 @@ const config = defineConfig({
|
|||
tanstackStart({ spa: { enabled: true } }),
|
||||
VitePWA({
|
||||
injectRegister: false,
|
||||
registerType: "prompt",
|
||||
registerType: "autoUpdate",
|
||||
outDir: ".output/public",
|
||||
devOptions: {
|
||||
enabled: true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue