You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prerender fails when using custom base path - attempts to fetch / instead of configured base path #6023
When configuring a custom base path in Vite along with TanStack Router's basepath, the prerenderer still attempts to crawl from / instead of the configured base path, resulting in a "Failed to fetch /: Not Found" error during build.
exportfunctiongetRouter(){returncreateTanStackRouter({
routeTree,basepath: BASEPATH,// ... other options});}
Run vite build
Build fails during prerender phase with:
[prerender] Crawling: /
error: Failed to fetch /: Not Found
at <anonymous> (/node_modules/@tanstack/start-plugin-core/dist/esm/prerender.js:126:23)
Expected behavior
The prerenderer should respect the configured base path and attempt to fetch from /gitlab/34e28e1e78c44601b0974c2097b85a27/caelum-doc-dist/ instead of /.
Activity
nlynzaad commentedon Dec 24, 2025
@busy-dog I cloned your repo and removing the trailing slash had it build correctly on my end. Please advise if this is the same for you.
nlynzaad commentedon Jan 6, 2026
@busy-dog this should now be supported with and without the trailing slash