fix: show active hot update version

This commit is contained in:
mac
2026-07-15 18:06:58 +08:00
parent 232aa41192
commit b29670250f
3 changed files with 5 additions and 4 deletions
+1
View File
@@ -1341,6 +1341,7 @@ ipcMain.handle("proxy-test", async () => proxy.testProxy());
// 有效内容版本:优先已确认健康的热更版本,其次包内 hotContentVersion,兜底 app.getVersion()。
// 让设置页版本号随热更走(热更不替换 package.json,单纯 app.getVersion() 会永远停在打包版本)。
function effectiveAppVersion() {
if (APP_ROOT !== BUNDLE_ROOT) return path.basename(APP_ROOT);
try {
const v = hotstate.effectiveVersion(global.__HOT_BASE__);
if (v) return v;