diff --git a/packages/cli/src/build/builder.rs b/packages/cli/src/build/builder.rs index 74b51163f..95bfc66b5 100644 --- a/packages/cli/src/build/builder.rs +++ b/packages/cli/src/build/builder.rs @@ -657,8 +657,6 @@ impl AppBuilder { None => self.build.asset_dir(), }; - tracing::debug!("Hotreloading asset {changed_file:?} in target {asset_dir:?}"); - // Canonicalize the path as Windows may use long-form paths "\\\\?\\C:\\". let changed_file = dunce::canonicalize(changed_file) .inspect_err(|e| tracing::debug!("Failed to canonicalize hotreloaded asset: {e}")) @@ -668,6 +666,8 @@ impl AppBuilder { let resource = artifacts.assets.assets.get(&changed_file)?; let output_path = asset_dir.join(resource.bundled_path()); + tracing::debug!("Hotreloading asset {changed_file:?} in target {asset_dir:?}"); + // Remove the old asset if it exists _ = std::fs::remove_file(&output_path); @@ -1310,6 +1310,6 @@ We checked the folder: {} /// Check if the queued build is blocking hotreloads pub(crate) fn can_receive_hotreloads(&self) -> bool { - matches!(&self.stage, BuildStage::Success) + matches!(&self.stage, BuildStage::Success | BuildStage::Failed) } } diff --git a/packages/cli/src/build/request.rs b/packages/cli/src/build/request.rs index 6251f39fe..07ba4ed7a 100644 --- a/packages/cli/src/build/request.rs +++ b/packages/cli/src/build/request.rs @@ -3758,4 +3758,14 @@ r#"