@quicktvui/web-cli 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/qt-web-cli.js +2 -4
- package/package.json +1 -1
- package/templates/dev-renderer.html +1 -1
package/bin/qt-web-cli.js
CHANGED
|
@@ -194,6 +194,8 @@ async function main() {
|
|
|
194
194
|
},
|
|
195
195
|
onReady: () => {
|
|
196
196
|
// 构建完成后,通知浏览器
|
|
197
|
+
// notifyBuildStatus 会更新 lastEvent 为 build-status:ready
|
|
198
|
+
// 这样 SSE 重连后收到的是 ready 而不是旧的 bundle-update
|
|
197
199
|
hotReloader.notifyBuildStatus('ready', '构建完成')
|
|
198
200
|
|
|
199
201
|
// 更新 bundle URL
|
|
@@ -209,10 +211,6 @@ async function main() {
|
|
|
209
211
|
const url = `http://localhost:${args.port}?bundle=${urlPath}`
|
|
210
212
|
openBrowser(url)
|
|
211
213
|
}
|
|
212
|
-
|
|
213
|
-
// 清除 HotReloader 中缓存的 bundle-update 事件
|
|
214
|
-
// 防止 SSE 重连后再次触发页面刷新导致无限循环
|
|
215
|
-
hotReloader.clearLastEvent()
|
|
216
214
|
},
|
|
217
215
|
})
|
|
218
216
|
|
package/package.json
CHANGED
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
// 冷却期内忽略 bundle-update(可能是 SSE 重连后缓存的旧事件)
|
|
311
311
|
if (Date.now() < sseCooldownUntil) {
|
|
312
312
|
console.log('[Dev] Ignoring bundle-update during cooldown');
|
|
313
|
-
updateStatus('ready', '
|
|
313
|
+
updateStatus('ready', '构建完成');
|
|
314
314
|
return;
|
|
315
315
|
}
|
|
316
316
|
updateStatus('building', 'Bundle 更新中...');
|