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(), VitePWA({ registerType: 'autoUpdate', includeAssets: ['favicon.svg'], manifest: { name: 'Store Tracker', short_name: 'Stores', description: 'Manage store matching rules for Firefly transaction categorization', theme_color: '#0f1117', background_color: '#0f1117', display: 'standalone', orientation: 'portrait', scope: '/', start_url: '/', icons: [ { src: 'pwa-192.png', sizes: '192x192', type: 'image/png', }, { src: 'pwa-512.png', sizes: '512x512', type: 'image/png', }, { src: 'pwa-512.png', sizes: '512x512', type: 'image/png', purpose: 'any maskable', }, ], }, workbox: { globPatterns: ['**/*.{js,css,html,svg,png,ico}'], runtimeCaching: [ { urlPattern: /^\/api\//, handler: 'NetworkFirst', options: { cacheName: 'api-cache', expiration: { maxEntries: 50, maxAgeSeconds: 300 }, }, }, ], }, }), ], server: { proxy: { '/api': 'http://192.168.1.80:45581', }, }, })