Pwa support, maybe

This commit is contained in:
2026-07-21 15:03:34 +10:00
parent e79c793b9c
commit 49cecad06d
8 changed files with 164 additions and 4 deletions

View File

@@ -13,22 +13,27 @@ export default defineConfig({
tailwindcss(),
VitePWA({
registerType: 'prompt',
includeAssets: ['favicon.svg', 'app-icon.svg'],
includeAssets: ['favicon.svg', 'app-icon.svg', 'apple-touch-icon.png', 'pwa-192.png', 'pwa-512.png'],
manifest: {
id: '/',
name: 'Native Vue Messenger',
short_name: 'NVR Messenger',
description: 'Gesture-first navigation for Vue applications',
theme_color: '#0b0d12',
background_color: '#0b0d12',
display: 'standalone',
scope: '/',
orientation: 'any',
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' },
{ src: '/app-icon.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'any' },
{ src: '/app-icon.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'maskable' },
],
},
workbox: {
cleanupOutdatedCaches: true,
navigateFallback: '/index.html',
globPatterns: ['**/*.{js,css,html,svg,png,woff2}'],
},