TanStack / TanStack/router

Prerendered pages are not served

Open
#7,473 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.1k
Forks
1.9k
Avg merge
1d 20h
Merged PRs (30d)
143

Description

Which project does this relate to?

Start

Describe the bug

When you create a prerender page in TanStack Start + Nitro setup, it isn't served, and you just see the SSR fallback with a loader call

Complete minimal reproducer

https://stackblitz.com/edit/github-aax16zwb

Steps to Reproduce the Bug
  1. npm run build
  2. npm run start
  3. go to /prerender
  4. refresh the page
Expected behavior

A prerendered page should be served, so you will have the same date after a refresh and no SSR fallback with a loader call

Screenshots or Videos

https://github.com/user-attachments/assets/b1ab2926-5356-4e07-b534-100144c5c56e

Platform
  • Router / Start Version: 1.170.7
  • OS: macOS
  • Browser: Chrome
  • Browser Version: 148.0.7778.179
  • Bundler: vite
  • Bundler Version: 8.0.14
Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the linked StackBlitz example by running npm run build and npm run start, then opening and refreshing /prerender. Trace why the prerendered output falls back to SSR and a loader call; done means /prerender serves the prerendered page with the same date after refresh and without the SSR fallback.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vite
Domain
full-stack, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.