import path from 'node:path' import { fileURLToPath } from 'node:url' import react from '@vitejs/plugin-react' import { defineConfig } from 'vite' const currentDir = path.dirname(fileURLToPath(import.meta.url)) const apiTarget = process.env.VITE_API_TARGET || 'http://127.0.0.1' export default defineConfig({ plugins: [react()], resolve: { alias: { '@': path.resolve(currentDir, 'src'), }, }, server: { host: '0.0.0.0', port: 5174, proxy: { '/api': { target: apiTarget, changeOrigin: true, }, '/health': { target: apiTarget, changeOrigin: true, }, }, }, })