Kansho/frontend/vite.config.js
2026-08-29 20:28:59 +02:00

45 lines
1.1 KiB
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: ['favicon.svg'],
manifest: {
name: 'Kanshō',
short_name: 'Kanshō',
description: 'Persönlicher Reflexionsbegleiter',
theme_color: '#3d5a4c',
background_color: '#f6f4ef',
display: 'standalone',
orientation: 'portrait',
icons: [
{ src: 'favicon.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'any' }
]
},
workbox: {
globPatterns: ['**/*.{js,css,html,svg}'],
runtimeCaching: [{
urlPattern: /^\/api\//,
handler: 'NetworkOnly',
options: { cacheName: 'api-cache' }
}]
}
})
],
server: {
port: 5188,
strictPort: true,
proxy: {
'/api': {
target: 'http://127.0.0.1:8018',
timeout: 600000,
proxyTimeout: 600000
}
}
}
})