From 52329f2a783ca6dd69c037ad9789322d9b373d88 Mon Sep 17 00:00:00 2001 From: Dicken Date: Mon, 25 May 2026 14:38:49 +0200 Subject: [PATCH] frontend/vite.config.js aktualisiert --- frontend/vite.config.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/frontend/vite.config.js b/frontend/vite.config.js index eefdfa7..ba7e627 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -7,6 +7,7 @@ export default defineConfig({ react(), VitePWA({ registerType: 'autoUpdate', + includeAssets: ['icon.svg'], manifest: { name: 'Dicken Dock', short_name: 'DickenDock', @@ -14,13 +15,21 @@ export default defineConfig({ theme_color: '#0d0d0f', background_color: '#0d0d0f', display: 'standalone', + orientation: 'portrait', start_url: '/', icons: [ - { src: '/icon-192.png', sizes: '192x192', type: 'image/png' }, - { src: '/icon-512.png', sizes: '512x512', type: 'image/png' } + { src: '/icon.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'any maskable' } ] + }, + 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' } }, -}) \ No newline at end of file +})