Function: buildRouteTree()
Documentation / @xmachines/play-router / buildRouteTree
function buildRouteTree(routes): RouteTree;Defined in: build-tree.ts:13
Build hierarchical route tree from flat route list
Constructs nested tree respecting parent-child state relationships. Absolute routes become top-level, relative routes nest under parents. Creates bidirectional maps for state ID ↔ path lookup.
Parameters
| Parameter | Type | Description |
|---|---|---|
routes | RouteInfo[] | Flat list of RouteInfo from extraction |
Returns
RouteTree with root, byStateId map, and byPath map