import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import { VitePWA } from 'vite-plugin-pwa' export default defineConfig({ plugins: [ react(), VitePWA({ registerType: 'prompt', includeAssets: ['fieldlens-mark.svg', 'apple-touch-icon.png', 'pwa-192.png', 'pwa-512.png'], manifest: { name: 'FieldLens Capture', short_name: 'FieldLens', description: 'Offline barcode capture and duplicate detection.', theme_color: '#17211f', background_color: '#f7f7f2', display: 'standalone', start_url: '/', icons: [ { src: '/pwa-192.png', sizes: '192x192', type: 'image/png', purpose: 'any', }, { src: '/pwa-512.png', sizes: '512x512', type: 'image/png', purpose: 'any', }, { src: '/pwa-512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable', }, ], }, workbox: { cleanupOutdatedCaches: true, navigateFallback: '/index.html', globPatterns: ['**/*.{js,css,html,svg,wasm}'], }, }), ], })