a5b00c2dea
- Vite+TS+ElementPlus+ECharts+Pinia+Router+Axios - auth store + JWT axios 拦截器 + 路由守卫 - 登录页 + Layout(侧栏 4 入口,回测/投研 active,模拟/实盘 disabled) - 占位页(backtest/factor,S1/S2 填充) - vitest auth store 3 tests passed + build 通过(dist 生成)
23 lines
657 B
TypeScript
23 lines
657 B
TypeScript
/// <reference types="vitest/config" />
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) },
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': { target: 'http://192.168.2.154:8000', changeOrigin: true },
|
|
'/ws': { target: 'ws://192.168.2.154:8000', ws: true, changeOrigin: true },
|
|
},
|
|
},
|
|
build: { outDir: 'dist', emptyOutDir: true },
|
|
test: { environment: 'jsdom', globals: true },
|
|
})
|