refactor(routes): drop localeCompare when sorting dynamic routes

Default codepoint sort matches the pages sort below and is not
locale/ICU dependent; route order is only consumed by exact-match
lookups, so ordering stays unobservable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pull/5342/head
Divyansh Singh 7 days ago
parent 9071b81608
commit 72f5b6d0de

@ -110,7 +110,7 @@ export async function resolvePages(
siteConfig.pages?.filter((p) => !discoveredPages.has(p)) || []
const finalDynamicRoutes = [...dynamicRoutes, ...externalDynamicRoutes].sort(
(a, b) => a.path.localeCompare(b.path)
(a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0)
)
const finalPages = [...pages, ...externalPages].sort()

Loading…
Cancel
Save