import tailwindcss from '@tailwindcss/vite' import react from '@vitejs/plugin-react' import { defineConfig } from 'vite' import { VitePWA } from 'vite-plugin-pwa' // https://vite.dev/config/ export default defineConfig({ plugins: [ react(), tailwindcss(), VitePWA({ strategies: 'injectManifest', srcDir: 'src', filename: 'sw.ts', registerType: 'autoUpdate', manifest: { name: 'Vibe', short_name: 'Vibe', theme_color: '#008080', background_color: '#c0c0c0', display: 'standalone', start_url: '/', icons: [ { src: '/icon-192.png', sizes: '192x192', type: 'image/png' }, { src: '/icon-512.png', sizes: '512x512', type: 'image/png' }, ], }, devOptions: { enabled: true, type: 'module', }, }), ], server: { proxy: { '/api': { target: 'http://localhost:8080', changeOrigin: true, }, '/ws': { target: 'ws://localhost:8080', ws: true, changeOrigin: true, }, }, }, })