Fundamental_Analysis/frontend/vite.config.ts
Lv, Qi a59b994a92 WIP: Commit all pending changes across services, frontend, and docs
- Sync updates for provider services (AlphaVantage, Finnhub, YFinance, Tushare)
- Update Frontend components and pages for recent config changes
- Update API Gateway and Registry
- Include design docs and tasks status
2025-11-27 02:45:56 +08:00

38 lines
974 B
TypeScript

import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
import path from "path"
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
return {
plugins: [react()],
optimizeDeps: {
exclude: ['dagre'],
// 'web-worker' needs to be optimized or handled correctly by Vite for elkjs
include: ['elkjs/lib/elk.bundled.js']
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
server: {
proxy: {
'/api': {
target: env.VITE_API_TARGET || 'http://localhost:4000',
changeOrigin: true,
},
'/health': {
target: env.VITE_API_TARGET || 'http://localhost:4000',
changeOrigin: true,
},
'/tasks': {
target: env.VITE_API_TARGET || 'http://localhost:4000',
changeOrigin: true,
},
},
},
}
})