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); }); });