From 7763f23f3224a0f609c4c483351edd656b0dfb26 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期一, 26 十月 2026 16:49:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_pro2.0' into dev_pro2.0
---
vite.config.ts | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/vite.config.ts b/vite.config.ts
index f8ca9af..b48844a 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -13,10 +13,9 @@
const appApiUrl = company?.apiUrl ?? '';
const appName = company?.name ?? '';
const isDev = mode === 'development';
- if (appName) {
- // 瑕嗙洊娴忚鍣ㄦ爣绛鹃〉鏍囬锛歏ite 鐨� resolveEnv 浼樺厛璇� process.env锛屼粠鑰屾浛鎹� index.html 閲岀殑 %VITE_APP_TITLE%
- process.env.VITE_APP_TITLE = appName;
- }
+ // 杩欓噷涓嶈鍐嶆妸 appName 鍐欒繘 VITE_APP_TITLE銆�
+ // 棣栧睆鏍囬銆佸姞杞介〉鏂囨宸插浐瀹氫负涓�ф枃妗堬紝鍝佺墝缁熶竴鐢辫繍琛屾椂銆屽叕鍙镐俊鎭�嶄笅鍙戯紱
+ // 涓�鏃﹀湪杩欓噷瑕嗙洊锛屾煇涓鎴风殑鍚嶇О灏变細琚紪璇戣繘 index.html / 鍔犺浇椤碉紝鎹釜鐜閮ㄧ讲灏�"涓插搧鐗�"銆�
console.log('[company]', companyKey, '-> name:', appName, 'logo:', appLogo, 'api:', appApiUrl || '(from env)');
const defineVars: Record<string, string> = {
@@ -86,6 +85,12 @@
target: "http://localhost:48080",
ws: true,
},
+ "/agent-api": {
+ changeOrigin: true,
+ target: "http://127.0.0.1:8091",
+ rewrite: (path) => path.replace(/^\/agent-api/, ""),
+ ws: true,
+ },
},
},
},
--
Gitblit v1.9.3