Skip to content

[docs] Outdated ISR guide? #7580

@cherniavskii

Description

@cherniavskii

Which project does this relate to?

Start

Describe the bug

I tried to implement ISG following the ISG guide, and it refers to prerender.routes option in tanstackStart() all the time:

import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [
    tanstackStart({
      prerender: {
        routes: ['/blog', '/blog/posts/*'],
        crawlLinks: true,
      },
    }),
  ],
})

This seems wrong, because prerender schema doesn't have a routes field:

prerender: z
.object({
enabled: z.boolean().optional(),
concurrency: z.number().optional(),
filter: z
.custom<
(page: z.infer<typeof pageSchema>) => unknown
>((value) => typeof value === 'function')
.optional(),
failOnError: z.boolean().optional(),
autoStaticPathsDiscovery: z.boolean().optional(),
maxRedirects: z.number().min(0).optional(),
})
.and(pagePrerenderOptionsSchema.optional())
.optional(),

Should the ISG guide document the prerender.filter option instead?

Complete minimal reproducer

https://tanstack.com/start/latest/docs/framework/react/guide/isr

Steps to Reproduce the Bug

Check out the ISG Guide

Expected behavior

Correct configuration is documented

Screenshots or Videos

No response

Platform

N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions