Skip to content

Commit

Permalink
chore: this is a little nicer..?
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 521d7cc commit 2ba82f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/remix-dev/config/flat-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ export function flatRoutes(
ignore: ignoredFilePatterns,
});

// fast-glob will return posix paths even on windows
// convert posix to os specific paths
let routePathsForOS = routePaths.map((routePath) => {
if (path.sep === "/") return routePath;
return routePath.split("/").join(path.sep);
return path.join(...routePath.split(path.posix.sep));
});

return flatRoutesUniversal(appDirectory, routePathsForOS);
Expand Down

0 comments on commit 2ba82f7

Please sign in to comment.