mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 14:44:12 +00:00
Clean up reloader
This commit is contained in:
parent
1bdc9d132e
commit
8d8e7edb82
3 changed files with 6 additions and 19 deletions
|
@ -6,7 +6,7 @@ use crate::{
|
||||||
},
|
},
|
||||||
BuildResult, Result,
|
BuildResult, Result,
|
||||||
};
|
};
|
||||||
use dioxus_cli_config::{CrateConfig, ExecutableType};
|
use dioxus_cli_config::CrateConfig;
|
||||||
use dioxus_hot_reload::HotReloadMsg;
|
use dioxus_hot_reload::HotReloadMsg;
|
||||||
use dioxus_html::HtmlCtx;
|
use dioxus_html::HtmlCtx;
|
||||||
use dioxus_rsx::hot_reload::*;
|
use dioxus_rsx::hot_reload::*;
|
||||||
|
|
|
@ -207,8 +207,6 @@ fn hotreload_files(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("Hot reloading: {:?}", messages);
|
|
||||||
|
|
||||||
for msg in messages {
|
for msg in messages {
|
||||||
let _ = hot_reload.messages.send(msg);
|
let _ = hot_reload.messages.send(msg);
|
||||||
}
|
}
|
||||||
|
@ -237,7 +235,7 @@ fn hotreload_file(
|
||||||
|
|
||||||
// If the extension is a backup file, or a hidden file, ignore it completely (no rebuilds)
|
// If the extension is a backup file, or a hidden file, ignore it completely (no rebuilds)
|
||||||
if is_backup_file(path) {
|
if is_backup_file(path) {
|
||||||
println!("Ignoring backup file: {:?}", path);
|
log::trace!("Ignoring backup file: {:?}", path);
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,5 @@
|
||||||
use std::{fs, io, process::Command, sync::Arc};
|
use super::{hot_reload::*, WsReloadState};
|
||||||
|
use crate::{server::HotReloadState, Result};
|
||||||
use crate::{
|
|
||||||
builder,
|
|
||||||
serve::Serve,
|
|
||||||
server::{
|
|
||||||
output::{print_console_info, PrettierOptions, WebServerInfo},
|
|
||||||
setup_file_watcher, HotReloadState,
|
|
||||||
},
|
|
||||||
BuildResult, Result,
|
|
||||||
};
|
|
||||||
use tower::ServiceBuilder;
|
|
||||||
|
|
||||||
use axum::{
|
use axum::{
|
||||||
body::Body,
|
body::Body,
|
||||||
extract::{
|
extract::{
|
||||||
|
@ -28,8 +17,8 @@ use axum::{
|
||||||
};
|
};
|
||||||
use axum_server::tls_rustls::RustlsConfig;
|
use axum_server::tls_rustls::RustlsConfig;
|
||||||
use dioxus_cli_config::{CrateConfig, WebHttpsConfig};
|
use dioxus_cli_config::{CrateConfig, WebHttpsConfig};
|
||||||
|
use std::{fs, io, process::Command, sync::Arc};
|
||||||
use super::{hot_reload::*, WsReloadState};
|
use tower::ServiceBuilder;
|
||||||
use tower_http::{
|
use tower_http::{
|
||||||
cors::{Any, CorsLayer},
|
cors::{Any, CorsLayer},
|
||||||
services::fs::{ServeDir, ServeFileSystemResponseBody},
|
services::fs::{ServeDir, ServeFileSystemResponseBody},
|
||||||
|
|
Loading…
Reference in a new issue