frontend/vite.config.js aktualisiert
This commit is contained in:
@@ -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,11 +15,19 @@ 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 }
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user