Partially Fix Hotreload (#2557)

* fix: template names

* fix: hot reload "resets" after reload

* revision: ensure all paths are split by `/`

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
Miles MurgawandJonathan Kelley authored and GitHub committed 2024-07-02 21:45:12 -07:00
1 parent 9567674a63
commit 7f6f0de085
8 files changed
+26 -17

No files matched your search

@@ -305,10 +305,7 @@ pub fn template_location(old_start: proc_macro2::LineColumn, file: &Path) -> Str
let line = old_start.line;
let column = old_start.column + 1;
#[cfg(not(target_os = "windows"))]
let path = file.to_string_lossy().to_string();
#[cfg(target_os = "windows")]
// Always ensure the path components are separated by `/`.
let path = file
.components()
.map(|c| c.as_os_str().to_string_lossy())