From 785fd15b542ee4ce8b8a8418360465db33079363 Mon Sep 17 00:00:00 2001 From: Angus Morton Date: Tue, 2 May 2023 20:15:02 +1000 Subject: [PATCH] Normalize the path to the routes.d.ts file Using path.posix.relative is not an option because it returns the wrong path. See: * https://github.com/nodejs/node/issues/13887 * https://github.com/nodejs/node/pull/13738 --- packages/run/src/vite/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/run/src/vite/plugin.ts b/packages/run/src/vite/plugin.ts index adead0e..4d0eab3 100644 --- a/packages/run/src/vite/plugin.ts +++ b/packages/run/src/vite/plugin.ts @@ -114,7 +114,7 @@ export default function markoRun(opts: Options = {}): Plugin[] { const data = await renderRouteTypeInfo( routes, - path.relative(typesDir, resolvedRoutesDir), + normalizePath(path.relative(typesDir, resolvedRoutesDir)), adapter );