Files
2026-07-22 13:48:46 +08:00

20 lines
455 B
TypeScript

import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
const proxyTarget =
env.CADDESIGNER_API_PROXY_TARGET || env.VITE_API_BASE_URL || 'http://127.0.0.1:8000'
return {
plugins: [react()],
server: {
port: 4173,
proxy: {
'/health': proxyTarget,
'/v1': proxyTarget,
},
},
}
})