소스 검색

fix hotreload cfg on release builds

Jonathan Kelley 1 년 전
부모
커밋
a3d6e9d07a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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),