diff --git a/packages/cli/src/serve/mod.rs b/packages/cli/src/serve/mod.rs index 4f76d19568..efaf9c43c5 100644 --- a/packages/cli/src/serve/mod.rs +++ b/packages/cli/src/serve/mod.rs @@ -120,6 +120,7 @@ pub(crate) async fn serve_all(mut args: ServeArgs) -> Result<()> { runner.file_map.force_rebuild(); // Tell the server to show a loading page for any new requests + devserver.send_reload_start().await; devserver.start_build().await; } else { tracing::warn!( @@ -227,6 +228,7 @@ pub(crate) async fn serve_all(mut args: ServeArgs) -> Result<()> { builder.rebuild(args.build_arguments.clone()); runner.file_map.force_rebuild(); + devserver.send_reload_start().await; devserver.start_build().await } diff --git a/packages/cli/src/serve/server.rs b/packages/cli/src/serve/server.rs index 9bdab2c86e..8edfc5bfd8 100644 --- a/packages/cli/src/serve/server.rs +++ b/packages/cli/src/serve/server.rs @@ -245,6 +245,7 @@ impl WebServer { self.build_status.set(Status::BuildError { error: ansi_to_html::convert(&error).unwrap_or(error), }); + self.send_reload_failed().await; self.send_build_status().await; } }