Track .env files in git for personal deployment sync.

Allow VITE_AMAP_KEY and related config to follow the repo; only .env.local remains ignored.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
xiaojibeier
2026-07-06 17:18:31 +08:00
parent 0deccf70a8
commit dd59b3aab5
4 changed files with 21 additions and 4 deletions
+6
View File
@@ -0,0 +1,6 @@
# 所有环境都会加载的配置
VITE_APP_TITLE=Vue3 Admin
# 高德 Web JS APIbuild 时打入前端包;dev/prod 共用)
VITE_AMAP_KEY=444de64142b2408b4e37e841244db8a4
VITE_AMAP_SECURITY_CODE=2893df04d1b639c422c9070994100cce
+4
View File
@@ -0,0 +1,4 @@
# 开发环境配置
NODE_ENV=development
VITE_APP_ENV=development
# 高德 Key 见根目录 .env(与生产 build 共用,避免漏打)
+7
View File
@@ -0,0 +1,7 @@
# 生产环境配置
VITE_APP_ENV=production
VITE_APP_BASE_URL=/api
# 高德 Web JS API Key(地图选点,npm run build 时打入 dist
VITE_AMAP_KEY=444de64142b2408b4e37e841244db8a4
VITE_AMAP_SECURITY_CODE=2893df04d1b639c422c9070994100cce
+4 -4
View File
@@ -7,10 +7,10 @@ dist-ssr/
build/
*.tsbuildinfo
# ── 环境变量(含密钥,勿提交)──────────────────────
.env
.env.*
!.env.example
# ── 环境变量 ───────────────────────────────────────
# 个人项目:.env 随仓库同步;仅忽略本地临时覆盖
.env.local
.env*.local
# ── 日志 ──────────────────────────────────────────
logs/