import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import { VitePWA } from 'vite-plugin-pwa' // https://vite.dev/config/ export default defineConfig({ plugins: [ react(), VitePWA({ registerType: 'autoUpdate', manifest: { name: 'KeepItTalking', short_name: 'Talking', start_url: '/', display: 'standalone', background_color: '#ffffff', theme_color: '#111111', icons: [ { src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png' }, { src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png' }, { src: '/icons/icon-512-maskable.png', sizes: '512x512', type: 'image/png', purpose: 'maskable', }, ], }, workbox: { navigateFallbackDenylist: [/^\/api/, /^\/ws/], runtimeCaching: [ { urlPattern: /^\/api\//, handler: 'NetworkOnly', }, ], }, }), ], server: { proxy: { '/api': { target: 'http://localhost:8000', changeOrigin: true, }, '/ws': { target: 'ws://localhost:8000', ws: true, }, }, }, })