frontend/vite.config.js aktualisiert

This commit is contained in:
2026-05-25 14:38:49 +02:00
parent 1c0c06fa2e
commit 52329f2a78

View File

@@ -7,6 +7,7 @@ export default defineConfig({
react(), react(),
VitePWA({ VitePWA({
registerType: 'autoUpdate', registerType: 'autoUpdate',
includeAssets: ['icon.svg'],
manifest: { manifest: {
name: 'Dicken Dock', name: 'Dicken Dock',
short_name: 'DickenDock', short_name: 'DickenDock',
@@ -14,13 +15,21 @@ export default defineConfig({
theme_color: '#0d0d0f', theme_color: '#0d0d0f',
background_color: '#0d0d0f', background_color: '#0d0d0f',
display: 'standalone', display: 'standalone',
orientation: 'portrait',
start_url: '/', start_url: '/',
icons: [ icons: [
{ src: '/icon-192.png', sizes: '192x192', type: 'image/png' }, { src: '/icon.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'any maskable' }
{ src: '/icon-512.png', sizes: '512x512', type: 'image/png' }
] ]
},
workbox: {
globPatterns: ['**/*.{js,css,html,svg,png,ico}'],
runtimeCaching: [{
urlPattern: /^\/api\/.*/i,
handler: 'NetworkFirst',
options: { cacheName: 'api-cache', networkTimeoutSeconds: 10 }
}]
} }
}) })
], ],
server: { proxy: { '/api': 'http://localhost:4000' } }, server: { proxy: { '/api': 'http://localhost:4000' } },
}) })