import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import { resolve } from 'path' export default defineConfig({ plugins: [react()], resolve: { alias: { '@': resolve(__dirname, 'src'), }, }, server: { proxy: { // 127.0.0.1, not localhost: on macOS `localhost` resolves to ::1 first, so // any stray process listening on IPv6 *:8000 hijacks the API proxy. '/api': { target: 'http://127.0.0.1:8000', changeOrigin: true, }, }, }, })