Browse Source

fix hotreload cfg on release builds

Jonathan Kelley 1 year ago
parent
commit
a3d6e9d07a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/desktop/src/launch.rs

+ 1 - 1
packages/desktop/src/launch.rs

@@ -113,7 +113,7 @@ pub fn launch_with_props_blocking<P: 'static>(root: Component<P>, props: P, cfg:
                 EventData::Poll => app.poll_vdom(id),
                 EventData::NewWindow => app.handle_new_window(),
                 EventData::CloseWindow => app.handle_close_msg(id),
-                #[cfg(feature = "hot-reload")]
+                #[cfg(all(feature = "hot-reload", debug_assertions))]
                 EventData::HotReloadEvent(msg) => app.handle_hot_reload_msg(msg),
                 EventData::Ipc(msg) => match msg.method() {
                     IpcMethod::FileDialog => app.handle_file_dialog_msg(msg, id),