Files
aiagent/frontend/vite.config.ts

25 lines
686 B
TypeScript
Raw Normal View History

2026-01-19 00:09:36 +08:00
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
port: 3001,
2026-01-19 00:09:36 +08:00
proxy: {
'/api': {
// 8037 若被旧实例/其它程序占用(/health 无 checks可设环境变量指向本仓库 API例如
// PowerShell: $env:AIAGENT_API_PROXY='http://127.0.0.1:8040'; npm run dev
target: process.env.AIAGENT_API_PROXY || 'http://127.0.0.1:8037',
2026-01-19 00:09:36 +08:00
changeOrigin: true
}
}
}
})