import { fileURLToPath, URL } from 'node:url' import react from '@vitejs/plugin-react' import { defineConfig } from 'vitest/config' export default defineConfig({ plugins: [react()], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, server: { proxy: { '/api': { target: 'http://localhost:8080', changeOrigin: true, }, '/xdrop': { target: 'http://localhost:9000', changeOrigin: false, }, }, }, test: { environment: 'jsdom', setupFiles: './src/test/setup.ts', globals: true, // Threads worker startup is flaky on Windows in Vitest 4, and forks also match CI. pool: 'forks', coverage: { provider: 'v8', reporter: ['text', 'lcov'], reportsDirectory: './coverage', }, }, })