Repository navigation
Public route/config loading API for routing-aware tooling #15127
sushichan044
started this conversation in
Proposals
Replies: 1 comment
To explain the background, this is necessary because for static analysis, we need to be able to load |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Related: #12522
I want to build routing-aware static analysis tools for my own React Router Framework Mode projects, such as validating route module paths or writing flexible lint rules that match project-specific practices.
To do that safely, I need access to the same framework graph that React Router already loads internally:
react-router.config.ts, including presetsapp/routes.tsasRouteConfigEntry[]RouteManifestThis is possible to hack together today by shelling out to
react-router routes --json, or by re-implementing parts of React Router's loading behavior in userland. But those are not healthy foundations for tooling.I want to maintain across React Router releases.
Could React Router expose a small documented API for this?
I am asking for the lower-level public API that would let community tooling load the official framework config/routes graph directly.
All reactions