Files
Kartikeya e0757088ef fix(frontend): remove PWA service worker to stop demo reloads
Drop vite-plugin-pwa and add an index.html snippet that unregisters any leftover service worker and clears its caches on load. Continuous deploys during the event plus a self-destroying SW were forcing open tabs to reload mid-demo. Browsers self-heal on next load; re-add a precaching PWA post-event.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 23:15:51 -07:00

21 lines
686 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
import { fileURLToPath, URL } from 'node:url';
export default defineConfig({
// No service worker in production. We deploy continuously during the event and
// any SW (even vite-plugin-pwa's self-destroying one) forces open tabs to
// reload, which breaks the live demo. Existing SWs are torn down by the
// cleanup snippet in index.html. Re-add a precaching PWA only post-event.
plugins: [react(), tailwindcss()],
server: {
port: 5173,
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
});