import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; // In der Produktion serviert nginx die statischen Dateien und proxyt /api // an den admin-api Container. Im Dev-Modus proxyen wir /api lokal. export default defineConfig({ plugins: [react()], base: '/', server: { port: 5173, proxy: { '/api': { target: 'http://localhost:3000', changeOrigin: true, rewrite: (p) => p.replace(/^\/api/, ''), }, }, }, });