/// import { defineConfig } from 'vitest/config'; import react from '@vitejs/plugin-react'; // The dev server proxies /api/* to the backend so the browser avoids CORS in // development. Override the target with VITE_API_TARGET (e.g. for Solaria). const apiTarget = process.env.VITE_API_TARGET || 'http://localhost:6500'; export default defineConfig({ plugins: [react()], server: { port: 5173, proxy: { '/api': { target: apiTarget, changeOrigin: true, }, }, }, test: { globals: true, environment: 'jsdom', setupFiles: './src/setupTests.ts', }, });