import path from 'node:path'; import react from '@vitejs/plugin-react'; import { defineConfig } from 'vite'; export default defineConfig({ plugins: [react()], resolve: { alias: { '@': path.resolve(__dirname, './src'), }, }, server: { host: '0.0.0.0', port: 5173, proxy: { // In `npm run dev`, proxy /api/* to the local Flask backend. '/api': { target: 'http://localhost:8000', changeOrigin: true, }, }, }, build: { outDir: 'dist', sourcemap: false, target: 'es2022', }, });