File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -315,4 +315,9 @@ impl Builder {
315
315
_ => false ,
316
316
}
317
317
}
318
+
319
+ /// Check if the queued build is blocking hotreloads
320
+ pub ( crate ) fn can_receive_hotreloads ( & self ) -> bool {
321
+ matches ! ( & self . stage, BuildStage :: Success )
322
+ }
318
323
}
Original file line number Diff line number Diff line change @@ -93,10 +93,10 @@ pub(crate) async fn serve_all(mut args: ServeArgs) -> Result<()> {
93
93
// and then send that update to all connected clients
94
94
if let Some ( hr) = runner. attempt_hot_reload ( files) . await {
95
95
// Only send a hotreload message for templates and assets - otherwise we'll just get a full rebuild
96
- if hr . templates . is_empty ( )
97
- && hr . assets . is_empty ( )
98
- && hr . unknown_files . is_empty ( )
99
- {
96
+ //
97
+ // Also make sure the builder isn't busy since that might cause issues with hotreloads
98
+ // https://github.com/DioxusLabs/dioxus/issues/3361
99
+ if hr . is_empty ( ) || !builder . can_receive_hotreloads ( ) {
100
100
tracing:: debug!( dx_src = ?TraceSrc :: Dev , "Ignoring file change: {}" , file) ;
101
101
continue ;
102
102
}
You can’t perform that action at this time.
0 commit comments