Skip to content

static pre-rendering does not pre-render pages that are not linked #5455

@FatahChan

Description

@FatahChan

Which project does this relate to?

Start

Describe the bug

I have enabled pre-render.

    tanstackStart({
      prerender:{
        enabled: true,
      }
    }),

I have the following routes

  • index.tsx
  • test1.tsx
  • test2.tsx

index route has a link to test2 route.

I expect that all routes to be pre-rendered.

actual
only index, and test2 are pre-rendered.

Image

Either this a bug in the code, or the documentation is not clear

https://tanstack.com/start/latest/docs/framework/react/guide/static-prerendering

according to the documentation, that if we don't specify a specify route to be re-rendered all routes will be prerenderd

Image

Your Example Website or App

https://github.com/FatahChan/start-basic-prerender

Steps to Reproduce the Bug or Issue

run pnpm build

output would be

Image

Expected behavior

test1 should also be pre-rendered, even it's not linked in the home page

Screenshots or Videos

No response

Platform

"@tanstack/react-router": "^1.132.47",
"@tanstack/react-start": "^1.132.53",
"@vitejs/plugin-react": "^5.0.4",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"vite": "^7.1.9"

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions