4ddc59be08
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>
19 lines
549 B
TypeScript
19 lines
549 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import { VitePWA } from 'vite-plugin-pwa';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
tailwindcss(),
|
|
// Self-destroying during active development: unregisters any previously
|
|
// installed service worker and clears its caches so deploys are always
|
|
// fresh (no stale UI). Re-enable a precaching PWA before the demo.
|
|
VitePWA({ selfDestroying: true }),
|
|
],
|
|
server: {
|
|
port: 5173,
|
|
},
|
|
});
|