From f388bb696972fef6f7c4b26b9e6557e970ad670d Mon Sep 17 00:00:00 2001 From: sanbuphy Date: Fri, 6 Feb 2026 14:45:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(vitepress):=20=E6=9E=84=E5=BB=BA=E9=98=B6?= =?UTF-8?q?=E6=AE=B5=E9=81=BF=E5=85=8D=E9=99=90=E6=B5=81=E6=BC=94=E7=A4=BA?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E5=99=A8=E5=B8=B8=E9=A9=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原因:RateLimitingDemo 在脚本顶层直接启动 setInterval,SSR 构建时也会执行,导致 Node 事件循环一直有活跃句柄,构建进程无法退出。 解决:将定时器移动到 onMounted,仅在浏览器端启动,并在 onUnmounted 中清理,避免构建阶段创建常驻任务。 结果:构建流程可正常结束,不再卡住。 --- .../gateway-proxy/RateLimitingDemo.vue | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/docs/.vitepress/theme/components/appendix/gateway-proxy/RateLimitingDemo.vue b/docs/.vitepress/theme/components/appendix/gateway-proxy/RateLimitingDemo.vue index 748bc6c..dec8836 100644 --- a/docs/.vitepress/theme/components/appendix/gateway-proxy/RateLimitingDemo.vue +++ b/docs/.vitepress/theme/components/appendix/gateway-proxy/RateLimitingDemo.vue @@ -221,7 +221,7 @@