Function: discoverRoutes()
discoverRoutes(
appDir):string[]
Defined in: static.ts:93
Discovers the route paths served by appDir, matching the same file convention
vite.ts uses to discover hydration entry points.
app/pets.tsx and app/pets/index.tsx both legitimately serve /pets (per
ReactRoute.resolveAppFile()'s own suffix-trial order) — when both exist, they map to
the same route path here and are deduplicated. Which underlying file backs a route is
irrelevant to discovery itself: the live server (crawled over real HTTP by
exportStaticSite()) is the one that resolves the file for each request, exactly as it
would for a normal, non-exported deployment.
Parameters
appDir
string
Returns
string[]