更新项目配置,添加 terser 作为压缩工具,修改 Vite 配置以支持生产环境构建,调整 API 基础地址为实际域名,并优化登录页面和游戏页面的状态管理逻辑。

This commit is contained in:
zyh
2025-08-27 18:29:50 +08:00
parent abde5d1f9d
commit 1c08651831
8 changed files with 173 additions and 29 deletions

View File

@@ -2,8 +2,8 @@
// 链接地址生成规则
export const LINK_CONFIG = {
// 基础域名
BASE_URL: 'http://localhost:5173',
// 基础域名 - 生产环境需要修改为实际域名
BASE_URL: import.meta.env.VITE_BASE_URL || window.location.origin,
// 游戏页面路径
GAME_PATH: '/play',