ForcePilot/web/vite.config.js
Kris f9f08221fc chore: 整理代码风格与优化细节
本次提交包含多类代码优化:
1. 修复多处单行代码换行格式,统一代码排版
2. 为外部系统模块新增快捷菜单配置
3. 优化前端API请求参数命名一致性
4. 补充媒体下载超限错误码与领域异常类
5. 完善仓储层更新逻辑,支持显式清空字段
6. 优化部分测试用例与工具函数代码结构
7. 为微信插件白名单缓存增加过期时间
2026-07-14 15:13:29 +08:00

39 lines
872 B
JavaScript

import { fileURLToPath, URL } from 'node:url'
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig(({ mode }) => {
// eslint-disable-next-line no-undef
const env = loadEnv(mode, process.cwd(), '')
return {
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
optimizeDeps: {
include: [
'echarts',
'echarts/core',
'echarts/charts',
'echarts/components',
'echarts/renderers'
]
},
server: {
proxy: {
'^/api': {
target: env.VITE_API_URL || 'http://api:5050',
changeOrigin: true
}
},
watch: {
usePolling: true,
ignored: ['**/node_modules/**', '**/dist/**'],
},
host: '0.0.0.0',
}
}
})