36 lines
1019 B
JavaScript
36 lines
1019 B
JavaScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
includeAssets: ['icon.svg'],
|
|
manifest: {
|
|
name: 'Dicken Dock',
|
|
short_name: 'DickenDock',
|
|
description: 'Dein modulares Tool-Dashboard',
|
|
theme_color: '#0d0d0f',
|
|
background_color: '#0d0d0f',
|
|
display: 'standalone',
|
|
orientation: 'portrait',
|
|
start_url: '/',
|
|
icons: [
|
|
{ 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' } },
|
|
})
|