I think configuring page rendering in
@tan_stack Start is a bit spread atm
configure Static rendering in vite.config.ts server.prerender
configure default SSR config in router.tsx, and per page ssr in the route's options
configure SPA mode in vite.config.ts spa.enabled
what if there was a one central place to configure the default rendering mode (maybe in router.tsx), and you can override each route config definition?
something like:
// router.tsx
export const createRouter = () => {
const router = createTanstackRouter({
routeTree,
defaultRendering: {
mode: 'ssr' // 'ssr' | 'static' | 'spa',
// other config...
})
return router
}
// some-route.tsx
export const Route = createFileRoute('/some-route')({
rendering: { mode: 'static' }, // or 'ssr' or any..
loader: () => {},
component: () => (<>some route</>),
})
@tannerlinsley @schanuelmiller