mitai-jinkendo/frontend/vite.config.js
Lars Stommer 89b6c0b072
Some checks are pending
Deploy to Raspberry Pi / deploy (push) Waiting to run
Build Test / build-frontend (push) Waiting to run
Build Test / lint-backend (push) Waiting to run
feat: initial commit – Mitai Jinkendo v9a
2026-03-16 13:35:11 +01:00

38 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: ['icon-192.png', 'icon-512.png'],
manifest: {
name: 'Mitai Jinkendo',
short_name: 'Mitai',
description: 'Körpervermessung & Körperfett Tracker',
theme_color: '#1D9E75',
background_color: '#f4f3ef',
display: 'standalone',
orientation: 'portrait',
icons: [
{ src: 'icon-192.png', sizes: '192x192', type: 'image/png' },
{ src: 'icon-512.png', sizes: '512x512', type: 'image/png' }
]
},
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
runtimeCaching: [{
urlPattern: /^\/api\//,
handler: 'NetworkFirst',
options: { cacheName: 'api-cache', expiration: { maxEntries: 50 } }
}]
}
})
],
server: {
proxy: { '/api': 'http://localhost:8000' }
}
})