import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], // Em dev, faz proxy da API para o backend Express server: { proxy: { '/api': 'http://localhost:3000', '/socket.io': { target: 'http://localhost:3000', ws: true }, '/uploads': 'http://localhost:3000', '/updates': 'http://localhost:3000' } }, build: { // O output vai para o diretório que o Express vai servir outDir: 'dist', emptyOutDir: true } })