import { sveltekit } from '@sveltejs/kit/vite'; import { defineConfig } from 'vite'; import { VitePWA } from 'vite-plugin-pwa'; import basicSsl from '@vitejs/plugin-basic-ssl'; export default defineConfig({ plugins: [ sveltekit(), basicSsl(), VitePWA({ strategies: 'injectManifest', srcDir: 'src', filename: 'sw.ts', registerType: 'autoUpdate', includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'mask-icon.svg'], manifest: { name: 'Spiceflow', short_name: 'Spiceflow', description: 'AI Session Orchestration - The spice must flow', theme_color: '#f97316', background_color: '#18181b', display: 'standalone', orientation: 'portrait', scope: '/', start_url: '/', icons: [ { src: 'pwa-192x192.png', sizes: '192x192', type: 'image/png' }, { src: 'pwa-512x512.png', sizes: '512x512', type: 'image/png' }, { src: 'pwa-512x512.png', sizes: '512x512', type: 'image/png', purpose: 'any maskable' } ] }, injectManifest: { globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'] }, devOptions: { enabled: true, type: 'module' } }) ], server: { host: '0.0.0.0', proxy: { '/api': { target: `http://localhost:${process.env.VITE_BACKEND_PORT || 3000}`, changeOrigin: true, ws: true } } } });