move hot reload socket into the target directory

This commit is contained in:
Evan Almloff committed 2023-12-07 07:00:59 -06:00
1 parent b965fc23e9
commit 9a13df2c73
3 files changed
+22 -20

No files matched your search

+5 -2
View File
@@ -1,4 +1,7 @@
use std::io::{BufRead, BufReader};
use std::{
io::{BufRead, BufReader},
path::PathBuf,
};
use dioxus_core::Template;
#[cfg(feature = "file_watcher")]
@@ -24,7 +27,7 @@ pub enum HotReloadMsg {
/// Connect to the hot reloading listener. The callback provided will be called every time a template change is detected
pub fn connect(mut f: impl FnMut(HotReloadMsg) + Send + 'static) {
std::thread::spawn(move || {
let path = std::env::temp_dir().join("dioxusin");
let path = PathBuf::from("./").join("target").join("dioxusin");
if let Ok(socket) = LocalSocketStream::connect(path) {
let mut buf_reader = BufReader::new(socket);
loop {