- 实现 API 端点 /api/config 用于获取和保存配置 - 添加配置信息脱敏功能,保护 API 密钥等敏感数据 - 集成配置验证逻辑,确保时区等参数有效性 - 在前端添加完整的配置管理页面界面 - 实现配置项的动态编辑和保存功能 - 添加连接设置功能用于 WebSocket 连接配置 - 提供多标签页界面分别管理不同配置模块 - 实现配置变更后的实时预览和保存确认
31 lines
641 B
TypeScript
31 lines
641 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { resolve } from 'path'
|
|
|
|
const gatewayPort = process.env.VITE_GATEWAY_PORT || '19876'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
'/ws': {
|
|
target: `ws://127.0.0.1:${gatewayPort}`,
|
|
ws: true,
|
|
},
|
|
'/health': `http://127.0.0.1:${gatewayPort}`,
|
|
'/api': `http://127.0.0.1:${gatewayPort}`,
|
|
},
|
|
},
|
|
build: {
|
|
outDir: '../static',
|
|
emptyOutDir: true,
|
|
},
|
|
})
|