From c06c1a06d627323474d5fa2ccfb7f05118de332a Mon Sep 17 00:00:00 2001 From: muxiangqiu Date: Tue, 19 Mar 2024 01:07:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(cli-service):=20=E4=BF=AE=E5=A4=8D=E9=A6=96?= =?UTF-8?q?=E6=AC=A1=E5=90=AF=E5=8A=A8=E5=B9=B6=E8=AE=BF=E9=97=AE=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=20404=20=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ dev-packages/cli-service/src/hooks/serve.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23bf32e1d..9ee2fed4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change +## 2.55.4 + +- fix(cli-service): 修复首次启动并访问出现 404 错误问题 + ## 2.55.3 - fix(cli-service + web): 修复 @PostConstruct 方法在开发方式启动会执行两次问题 diff --git a/dev-packages/cli-service/src/hooks/serve.ts b/dev-packages/cli-service/src/hooks/serve.ts index 5bdf94b5b..7c366c9f8 100644 --- a/dev-packages/cli-service/src/hooks/serve.ts +++ b/dev-packages/cli-service/src/hooks/serve.ts @@ -28,8 +28,8 @@ export default async (ctx: CliContext) => { context.compiler = compiler; context.entryContextProvider = entryContextProvider; compiler.hooks.done.tap('ServeAfter', async stats => { - new HookExecutor().executeServeHooks(context, HookStage.after); context.stats = stats; + new HookExecutor().executeServeHooks(context, HookStage.after); await CommandUtil.executeCommand(context, CommandType.ServeCommand, CommandStage.after); }); });