From d3b8eed1c1ff3bf4bda24973736baf3e5f510bbf Mon Sep 17 00:00:00 2001 From: Davide <43080019+edivados@users.noreply.github.com> Date: Mon, 25 Sep 2023 19:45:33 +0200 Subject: [PATCH] fix hmr --- packages/vinxi/lib/plugins/fs-watcher.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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();