Part 2 of building a blog with TanStack Start focuses on solving performance issues caused by Shiki's WASM-heavy initialization and serverless cold starts. The solution is static pre-rendering, enabled via a simple vite.config.ts setting that causes TanStack to crawl and pre-render all routes at build time. However, client-side navigation still triggers server functions, so the post introduces the @tanstack/start-static-server-functions middleware, which records server function invocations during the build and replaces them with static JSON file fetches at runtime — enabling a fully static, server-free blog deployment.
Table of contents
Performance IssuesCold StartsGoing StaticPre-Rendering PagesRunning Content as a Static WebsiteHow TanStack Start Does Pre-RenderingStatic Server FunctionsConcluding ThoughtsSort: