import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; export default defineConfig({ plugins: [react()], build: { outDir: "dist" }, // Proxy SOLO para `vite dev` (puerto 5173 por defecto). En producción nginx // del propio frontend hace de proxy; este bloque no afecta a `vite build`. server: { proxy: { "/api": { target: "http://localhost:3001", changeOrigin: true }, }, }, });