// https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ compatibilityDate: '2025-07-15', devtools: { enabled: true }, modules: [ '@nuxt/ui', '@nuxt/fonts', '@vite-pwa/nuxt' ], runtimeConfig: { public: { supabaseUrl: process.env.NUXT_PUBLIC_SUPABASE_URL || 'http://localhost:54321', supabaseAnonKey: process.env.NUXT_PUBLIC_SUPABASE_ANON_KEY || '' } }, colorMode: { preference: 'light' }, pwa: { registerType: 'autoUpdate', manifest: { name: 'Pantry - Smart Inventory Manager', short_name: 'Pantry', description: 'Track your household pantry inventory with ease. Barcode scanning, smart organization, and multi-user support.', theme_color: '#10b981', background_color: '#ffffff', display: 'standalone', orientation: 'portrait', scope: '/', start_url: '/', categories: ['productivity', 'lifestyle'], icons: [ { src: '/icon-192x192.png', sizes: '192x192', type: 'image/png', purpose: 'any' }, { src: '/icon-512x512.png', sizes: '512x512', type: 'image/png', purpose: 'any' }, { src: '/icon-192x192-maskable.png', sizes: '192x192', type: 'image/png', purpose: 'maskable' }, { src: '/icon-512x512-maskable.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' } ], screenshots: [ { src: '/screenshot-mobile.png', sizes: '390x844', type: 'image/png', form_factor: 'narrow', label: 'Pantry inventory view on mobile' }, { src: '/screenshot-desktop.png', sizes: '1920x1080', type: 'image/png', form_factor: 'wide', label: 'Pantry inventory view on desktop' } ] }, workbox: { navigateFallback: '/', globPatterns: ['**/*.{js,css,html,png,svg,ico}'], cleanupOutdatedCaches: true, runtimeCaching: [ { urlPattern: /^https:\/\/api\.supabase\.co\/.*/i, handler: 'NetworkFirst', options: { cacheName: 'supabase-api', expiration: { maxEntries: 100, maxAgeSeconds: 60 * 60 * 24 // 24 hours }, cacheableResponse: { statuses: [0, 200] } } }, { urlPattern: /^https:\/\/.*\.supabase\.co\/.*/i, handler: 'NetworkFirst', options: { cacheName: 'supabase-data', expiration: { maxEntries: 100, maxAgeSeconds: 60 * 60 * 24 // 24 hours }, cacheableResponse: { statuses: [0, 200] } } } ] }, devOptions: { enabled: true, type: 'module' } } })