import dotenv from 'dotenv'; | |
dotenv.config(); | |
import { defineConfig } from 'vite'; | |
import reactRefresh from '@vitejs/plugin-react-refresh'; | |
const { PORT = 7860 } = process.env; | |
// https://vitejs.dev/config/ | |
export default defineConfig({ | |
plugins: [reactRefresh()], | |
server: { | |
proxy: { | |
'/api': { | |
target: `http://localhost:${PORT}`, | |
changeOrigin: true, | |
}, | |
}, | |
}, | |
build: { | |
outDir: 'dist/app', | |
}, | |
}); | |