From 9793013a56446c0e1ce1b5121da030cda8dddb63 Mon Sep 17 00:00:00 2001 From: yuliang_guo Date: Thu, 29 Jan 2026 18:55:25 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 frontend/.env.production (VITE_APP_ENV=production) - 修改 .gitignore 允许提交环境配置 - 修复生产环境显示"开发环境"标识的问题 --- .gitignore | 5 +++-- frontend/.env.production | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 frontend/.env.production diff --git a/.gitignore b/.gitignore index f2e474a..21449d1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,9 @@ .env .env.local .env.*.local -.env.production -.env.staging +# 允许提交非敏感的环境配置(用于 Vite 构建) +# .env.production +# .env.staging # ---------------- # 依赖目录 diff --git a/frontend/.env.production b/frontend/.env.production new file mode 100644 index 0000000..72cd9f3 --- /dev/null +++ b/frontend/.env.production @@ -0,0 +1,7 @@ +# 生产环境配置 +VITE_APP_ENV=production +VITE_API_BASE_URL=https://aiedu.ireborn.com.cn +VITE_WS_BASE_URL=wss://aiedu.ireborn.com.cn +VITE_USE_MOCK_DATA=false +VITE_ENABLE_REQUEST_LOG=false +NODE_ENV=production