Files
NexQuant/web/vite.config.ts
XianBW 14395488b9 feat: add a web UI server (#1345)
* update rdagent cmd

* fix log error message

* use multiProcessing.Process instead of subprocess.Popen

* add traces to gitignore

* add user interactor in RDLoop (finance scenarios)

* add interactor (feedback, hypothesis) for quant scens

* fix the test_end in qlib conf

* add features init config, general instruction to qlib scenarios

* set base features for based exp

* fix bug when combine factors

* move traces folder to git_ignore_folder

* fix bug in features init

* fix quant interact bug

* fix logger warning error

* bug fixes

* modify rdagent logger, now it can set file output

* adjust cli functions and fix logger bug

* fix server port transport problem

* update server_ui in cli

* add web code

* fix CI problem

* black fix

* update web ui README

* update README

* update readme
2026-03-18 14:04:52 +08:00

50 lines
1.3 KiB
TypeScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import path from 'path'
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
// import commonjs from '@rollup/plugin-commonjs'
// import nodePolyfills from 'rollup-plugin-node-polyfills'
const pathResolve = (pathStr: string) => {
return path.resolve(__dirname, pathStr)
}
// https://vitejs.dev/config/
export default defineConfig({
base: "./",
plugins: [
vue(),
createSvgIconsPlugin({
iconDirs: [pathResolve('./src/assets/icon')],
symbolId: 'icon-[dir]-[name]',
}),
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
],
define: {
'global': 'window' // 设置 global 为 window 解决一些兼容问题
},
server: {
host: true,
port: 8080, // 使用的端口号
open: true, // 是否自动打开浏览器
watch: {
usePolling: true, // 实时监听
interval: 1000 // 监听的间隔时间(ms)
},
},
resolve: {
alias: {
'@': pathResolve('./src')
}
}
})