import { defineConfig } from 'vitest/config' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' import path from 'node:path' export default defineConfig({ plugins: [react(), tailwindcss()], resolve: { alias: { '@': path.resolve(__dirname, './src'), }, }, server: { port: 5180, strictPort: true, host: true, // Aceita qualquer host — usado quando rodamos atrás de um tunnel (loca.lt, ngrok, cloudflared) allowedHosts: true, }, preview: { port: 5180, strictPort: true, host: true, allowedHosts: true, }, test: { environment: 'jsdom', globals: true, setupFiles: './src/__tests__/setup.ts', }, })