Skip to content

Commit

Permalink
fix(remix-dev): fast glob will return posix style paths even on windows
Browse files Browse the repository at this point in the history
Signed-off-by: Logan McAnsh <logan@mcan.sh>
  • Loading branch information
mcansh committed Jan 26, 2023
1 parent 4edd740 commit d98afd0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/remix-dev/config/flat-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ export function flatRoutes(
ignore: ignoredFilePatterns,
});

return flatRoutesUniversal(appDirectory, routePaths);
let routePathsForOS = routePaths.map((routePath) => {
if (path.sep === "/") return routePath;
return routePath.split("/").join(path.sep);
});

return flatRoutesUniversal(appDirectory, routePathsForOS);
}

interface RouteInfo extends ConfigRoute {
Expand Down

0 comments on commit d98afd0

Please sign in to comment.