/// import react from '@vitejs/plugin-react'; import { defineConfig } from 'vite'; export default defineConfig({ plugins: [react()], build: { target: 'es2022', }, server: { // E2E installs a stateful fake API in the page. A dev-server reload would // discard it in the middle of a scenario (including other parallel workers). hmr: process.env.VITE_E2E === '1' ? false : undefined, host: '127.0.0.1', port: 5173, strictPort: true, // В разработке API поднимается docker compose (deploy/compose.dev.yaml) на :8080 proxy: { '/api': 'http://localhost:8080', '/healthz': 'http://localhost:8080', }, }, test: { environment: 'jsdom', setupFiles: ['src/test/setup.ts'], exclude: ['e2e/**', 'node_modules/**'], }, });