Skip to content

Commit

Permalink
make fs router work on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nksaraf committed Aug 7, 2023
1 parent f40ad67 commit 1d04f1c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/vinxi/lib/plugins/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ export function routes() {
},
async load(url) {
const [id, query] = url.split("?");
if (id === fileURLToPath(new URL("../routes.js", import.meta.url))) {
if (
id ===
fileURLToPath(new URL("../routes.js", import.meta.url)).replace(
"\\",
"/",
)
) {
const js = jsCode();
const routesCode = JSON.stringify(
await router.fileRouter?.getRoutes(),
Expand Down

0 comments on commit 1d04f1c

Please sign in to comment.