import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], server: { port: 5173, proxy: { // Vite dev server proxies API + healthz to a running edgeguard-api. // Production: HAProxy fronts both edgeguard-api (UI + /api/*) on the // same vhost. '/api': { target: 'http://127.0.0.1:9443', changeOrigin: true, }, '/healthz': { target: 'http://127.0.0.1:9443', changeOrigin: true, }, }, }, build: { outDir: 'dist', sourcemap: false, // Explizites Target — Vites Default rotiert sonst mit jeder // Vite-Version und bricht uns potenziell auf älteren Mobil-Browsern. // Diese Liste deckt iOS Safari 15+, Android Chrome 90+, modernes // Firefox/Edge ab. Quelle für „blank page on iOS" sind oft // ES2022-Features (Top-Level-await, `.at(-1)` etc) — `es2020` schließt das aus. target: ['es2020', 'chrome90', 'firefox88', 'safari15', 'edge90'], }, })