feat: add PWA manifest configuration (#32)
Some checks failed
Deploy to Coolify / Code Quality (pull_request) Has been cancelled
Deploy to Coolify / Run Tests (pull_request) Has been cancelled
Deploy to Coolify / Deploy to Development (pull_request) Has been cancelled
Deploy to Coolify / Deploy to Production (pull_request) Has been cancelled
Deploy to Coolify / Deploy to Test (pull_request) Has been cancelled
Pull Request Checks / Validate PR (pull_request) Has been cancelled
Some checks failed
Deploy to Coolify / Code Quality (pull_request) Has been cancelled
Deploy to Coolify / Run Tests (pull_request) Has been cancelled
Deploy to Coolify / Deploy to Development (pull_request) Has been cancelled
Deploy to Coolify / Deploy to Production (pull_request) Has been cancelled
Deploy to Coolify / Deploy to Test (pull_request) Has been cancelled
Pull Request Checks / Validate PR (pull_request) Has been cancelled
- Install @vite-pwa/nuxt module - Configure PWA manifest with app metadata - Set up Workbox service worker configuration - Add runtime caching for Supabase API - Enable PWA dev mode for testing - Configure icons and screenshots (placeholders for #33) Closes #32
This commit is contained in:
@@ -5,7 +5,8 @@ export default defineNuxtConfig({
|
||||
|
||||
modules: [
|
||||
'@nuxt/ui',
|
||||
'@nuxt/fonts'
|
||||
'@nuxt/fonts',
|
||||
'@vite-pwa/nuxt'
|
||||
],
|
||||
|
||||
runtimeConfig: {
|
||||
@@ -17,5 +18,102 @@ export default defineNuxtConfig({
|
||||
|
||||
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'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user