refactor: 移除运行时后端配置并统一使用构建变量

删除 public/config.js 及 HTML 加载引用,后端地址改为构建变量优先、否则同源。补充环境变量示例、配置回归测试与部署迁移说明。

验证:npm run check 通过,183 项测试通过,生产构建成功。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
zhanjunhao
2026-10-22 12:50:16 +08:00
parent d35330d530
commit 82a56092bc
7 changed files with 88 additions and 77 deletions
+1 -5
View File
@@ -18,9 +18,5 @@ For commercial licensing, please contact support@quantumnous.com
*/
export function getServerURL() {
return (
window.__APP_CONFIG__?.SERVER_URL ||
import.meta.env.VITE_REACT_APP_SERVER_URL ||
''
);
return import.meta.env.VITE_REACT_APP_SERVER_URL || '';
}