fix: Use correct cfg for file_watcher feature in dioxus-hot-reload (#1238)

* fix: Use correct cfg for file_watcher feature in dioxus-hot-reload

* Update file_watcher.rs

* Update lib.rs

* fmt
This commit is contained in:
Marc Espín 2023-07-23 16:29:59 +02:00 committed by GitHub
parent 0097b82490
commit 915e79e3be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -5,6 +5,7 @@ use std::{
sync::{Arc, Mutex},
};
use crate::HotReloadMsg;
use dioxus_core::Template;
use dioxus_rsx::{
hot_reload::{FileMap, FileMapBuildResult, UpdateResult},

View file

@ -1,15 +1,15 @@
use std::io::{BufRead, BufReader};
use dioxus_core::Template;
#[cfg(file_watcher)]
#[cfg(feature = "file_watcher")]
pub use dioxus_html::HtmlCtx;
use interprocess_docfix::local_socket::LocalSocketStream;
use serde::{Deserialize, Serialize};
#[cfg(file_watcher)]
#[cfg(feature = "file_watcher")]
mod file_watcher;
#[cfg(file_watcher)]
use file_watcher::*;
#[cfg(feature = "file_watcher")]
pub use file_watcher::*;
/// A message the hot reloading server sends to the client
#[derive(Debug, Serialize, Deserialize, Clone, Copy)]