fix(frontend): self-destroying service worker to avoid stale UI during dev
The precaching PWA SW was serving an old bundle after deploys (stale UI). Switch to selfDestroying so it unregisters + clears caches on all clients; deploys are now always fresh. Re-add a tuned PWA before the demo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+4
-11
@@ -7,17 +7,10 @@ export default defineConfig({
|
|||||||
plugins: [
|
plugins: [
|
||||||
react(),
|
react(),
|
||||||
tailwindcss(),
|
tailwindcss(),
|
||||||
VitePWA({
|
// Self-destroying during active development: unregisters any previously
|
||||||
registerType: 'autoUpdate',
|
// installed service worker and clears its caches so deploys are always
|
||||||
manifest: {
|
// fresh (no stale UI). Re-enable a precaching PWA before the demo.
|
||||||
name: 'PodMan',
|
VitePWA({ selfDestroying: true }),
|
||||||
short_name: 'PodMan',
|
|
||||||
description: 'Ambient AI teammate that prevents merge collisions before push',
|
|
||||||
theme_color: '#0b0f17',
|
|
||||||
background_color: '#0b0f17',
|
|
||||||
display: 'standalone',
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
],
|
],
|
||||||
server: {
|
server: {
|
||||||
port: 5173,
|
port: 5173,
|
||||||
|
|||||||
Reference in New Issue
Block a user