Files
EasyFlow/easyflow-ui-admin/app/vite.config.mts
陈子默 cff4fe8da9 build: 适配管理端 flow 基路径
- 调整开发与分析环境的 base 和接口前缀为 /flow

- 更新 Vite 代理配置,兼容 /flow/api 与 /flow/userCenter

- 修复基路径下的 Logo 与启动加载图资源地址
2026-03-18 21:56:36 +08:00

39 lines
970 B
TypeScript

import {defineConfig} from '@easyflow/vite-config';
import ElementPlus from 'unplugin-element-plus/vite';
export default defineConfig(async () => {
return {
application: {},
vite: {
resolve: {
alias: {
// @vueuse/motion expects tslib default export during dev pre-bundling
// and breaks when Vite resolves to ESM-only modules/index.js.
tslib: 'tslib/tslib.js',
},
},
plugins: [
ElementPlus({
format: 'esm',
}),
],
server: {
proxy: {
'/flow/api': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/flow/, ''),
target: 'http://127.0.0.1:8111',
ws: true,
},
'/flow/userCenter': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/flow/, ''),
target: 'http://127.0.0.1:8111',
},
},
},
},
};
});