trading-discipline-frontend/vite.config.ts

25 lines
725 B
TypeScript
Raw Normal View History

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
server: {
proxy: {
// ============================================
// Rust 后端(多数据源聚合:东方财富→新浪→腾讯)
// ============================================
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
},
// 东方财富 - 指数批量行情(固定小集合,直连保证权威性)
'/em-quote': {
target: 'https://push2.eastmoney.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/em-quote/, ''),
},
},
},
})