diff --git a/packages/vinxi/lib/plugins/fs-watcher.js b/packages/vinxi/lib/plugins/fs-watcher.js index dfe79877..02bda42b 100644 --- a/packages/vinxi/lib/plugins/fs-watcher.js +++ b/packages/vinxi/lib/plugins/fs-watcher.js @@ -1,4 +1,5 @@ import { fileURLToPath } from "node:url"; +import { normalize } from "pathe"; /** * @@ -43,7 +44,7 @@ export const fileSystemWatcher = () => { config.router.internals.routes.addEventListener("reload", () => { const { moduleGraph } = server; const mods = moduleGraph.getModulesByFile( - fileURLToPath(new URL("../routes.js", import.meta.url)), + normalize(fileURLToPath(new URL("../routes.js", import.meta.url))), ); if (mods) { const seen = new Set();