Sichert den lokalen Entwicklungsstand nach Gitea: Nav/Dashboard, Personen-Excel/Archiv, Team-Setup, Assignment-Übergabe und C6/C7/T2. Co-authored-by: Cursor <cursoragent@cursor.com>
53 lines
1.6 KiB
TypeScript
53 lines
1.6 KiB
TypeScript
import { defineConfig, loadEnv } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), '')
|
|
/** V2-Defaults — Produktiv bleibt auf 5173 / API 4000. */
|
|
const port = Number(env.PORT || process.env.PORT || 5174)
|
|
const apiUrl = env.API_URL || process.env.API_URL || 'http://localhost:4001'
|
|
|
|
if (port === 5173) {
|
|
throw new Error(
|
|
`[vite] SAFETY: PORT=${port} kollidiert mit dem Produktiv-Frontend. V2 erwartet z.B. 5174 (siehe .env).`,
|
|
)
|
|
}
|
|
|
|
return {
|
|
server: {
|
|
port,
|
|
strictPort: true,
|
|
proxy: {
|
|
'/api': apiUrl,
|
|
},
|
|
},
|
|
plugins: [
|
|
react(),
|
|
tailwindcss(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
includeAssets: ['favicon.svg', 'apple-touch-icon.png'],
|
|
manifest: {
|
|
name: 'Assignment Monitor',
|
|
short_name: 'AM Monitor',
|
|
description: 'Live-Bewertung und Feedback für Capgemini-Trainees während Kunden-Assignments (DEV).',
|
|
lang: 'de',
|
|
start_url: '/',
|
|
scope: '/',
|
|
theme_color: '#0070AD',
|
|
background_color: '#eef2f5',
|
|
display: 'standalone',
|
|
orientation: 'any',
|
|
icons: [
|
|
{ src: 'pwa-192.png', sizes: '192x192', type: 'image/png', purpose: 'any' },
|
|
{ src: 'pwa-512.png', sizes: '512x512', type: 'image/png', purpose: 'any' },
|
|
{ src: 'pwa-512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' },
|
|
],
|
|
},
|
|
}),
|
|
],
|
|
}
|
|
})
|