matchRoute() — astro Function Reference
Architecture documentation for the matchRoute() function in match.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD b07efbb6_8bdd_92ef_151d_3bf4f77c80c9["matchRoute()"] 0b4969b2_7e25_9c4a_3b7f_911a988f8209["match.ts"] b07efbb6_8bdd_92ef_151d_3bf4f77c80c9 -->|defined in| 0b4969b2_7e25_9c4a_3b7f_911a988f8209 style b07efbb6_8bdd_92ef_151d_3bf4f77c80c9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/core/routing/match.ts lines 7–14
export function matchRoute(pathname: string, manifest: RoutesList): RouteData | undefined {
return manifest.routes.find((route) => {
return (
route.pattern.test(pathname) ||
route.fallbackRoutes.some((fallbackRoute) => fallbackRoute.pattern.test(pathname))
);
});
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does matchRoute() do?
matchRoute() is a function in the astro codebase, defined in packages/astro/src/core/routing/match.ts.
Where is matchRoute() defined?
matchRoute() is defined in packages/astro/src/core/routing/match.ts at line 7.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free