39 lines
1.0 KiB
JavaScript
39 lines
1.0 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: 'NetworkFirst',
|
|
options: { cacheName: 'api-cache', expiration: { maxEntries: 50 } }
|
|
}]
|
|
}
|
|
})
|
|
],
|
|
server: {
|
|
port: 5188,
|
|
strictPort: true,
|
|
proxy: { '/api': 'http://127.0.0.1:8018' }
|
|
}
|
|
})
|