优化 移除多余的环境变量

This commit is contained in:
yuantao
2025-12-01 14:56:14 +08:00
parent 328a53a343
commit 5c6035b6ab
2 changed files with 1 additions and 17 deletions

4
.env
View File

@@ -4,7 +4,3 @@ VITE_APPID=wx9cb717d8151d8486 #小程序APPID
VITE_UNI_APPID=_UNI_8842336 #UNI-APPID
VITE_LIBVERSION=3.0.0 #微信小程序基础库
VITE_WEBHOOK=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9a401eb2-065a-4882-82e9-b438bcd1eac4#WEBHOOK地址
# 环境控制
# VITE_ENABLE_ERROR_MONITOR=true # 强制启用错误监控
# VITE_DISABLE_ERROR_MONITOR=true # 强制禁用错误监控
# 默认:开发环境和体验版禁用,生产环境启用

View File

@@ -393,18 +393,6 @@ class Tool {
return false
}
// 检查自定义环境变量
const enableProductionMode = import.meta.env.VITE_ENABLE_ERROR_MONITOR === 'true'
const disableProductionMode = import.meta.env.VITE_DISABLE_ERROR_MONITOR === 'true'
if (disableProductionMode) {
return false
}
if (enableProductionMode) {
return true
}
// 默认:开发环境和体验版不启用,生产环境启用
return true
}