tanstack-start-spa-prerender

Configure TanStack Start SPA prerendering for static GitHub Pages deployments.

1|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/matthewharwood/dean-stack --skill tanstack-start-spa-prerender
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-start-spa-prerender
Source: https://github.com/matthewharwood/dean-stack/tree/main/.claude/skills/tanstack-start-spa-prerender
Command: npx skills add https://github.com/matthewharwood/dean-stack --skill tanstack-start-spa-prerender

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enable fast, static deployments of TanStack Start-based SPAs by prerendering routes for GitHub Pages, eliminating server dependencies and ensuring instant navigation on first load.

Core Features & Use Cases

  • SPA mode with full prerender for all routes, producing a client-ready static artifact.
  • No server functions or server loaders; the shell prerenders and hydrates from IndexedDB on first client load.
  • GitHub Pages integration patterns (BASE_PATH, 404.html fallback) handled by the nitro skill, reducing manual deploy steps.

Quick Start

Enable SPA prerender in your Vite config using tanstackStart and run bun run check to produce the static site.

Frequently Asked Questions about tanstack-start-spa-prerender

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prerender TanStack Start SPA routes for GitHub Pages?

TanStack Start can fully prerender SPA routes by enabling SPA mode and prerender in your Vite config, which produces a client-ready static artifact deployable directly to GitHub Pages without server dependencies.

Can I use TanStack Start server functions with SPA prerendering enabled?

No, this SPA prerender configuration does not use server functions or server loaders. The application shell prerenders statically and then hydrates from IndexedDB on the first client load.

Does prerendering a TanStack Start SPA handle GitHub Pages base path and 404 routing?

Yes, GitHub Pages integration patterns including BASE_PATH and 404.html fallback are handled by the nitro configuration, which reduces manual deployment steps for your static SPA.

Why prerender a TanStack Start SPA instead of using client-side routing?

Prerendering a TanStack Start SPA eliminates server dependencies and ensures instant navigation on first load by generating static HTML files, providing fast static deployments without server costs.

What are the limitations of prerendering TanStack Start SPA routes statically?

Limitations include the inability to use server functions or server loaders, requiring all dynamic data to hydrate from the client via IndexedDB, and the need to configure static routing fallbacks for GitHub Pages.