/// import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], server: { // Fait passer l'API par la même origine que le SPA en dev (localhost:5173) // au lieu d'un appel cross-origin direct vers localhost:8080 — nécessaire // depuis le passage à l'authentification 100% cookie HttpOnly (plus de // fallback Authorization: Bearer, voir lib/api.ts) : un cookie // SameSite=Lax n'est pas envoyé sur un fetch() cross-site. proxy: { '/api': { target: 'http://localhost:8080', changeOrigin: true }, '/healthz': { target: 'http://localhost:8080', changeOrigin: true }, }, }, test: { globals: true, environment: 'jsdom', }, })