start-deployment

Configure and deploy TanStack Start apps to Cloudflare, Netlify, Vercel, Node, and Bun.

1|Updated Jul 29, 2026
One-click install
npx skills add https://github.com/fusengine/kimi-code --skill start-deployment-fusengine
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: start-deployment
Source: https://github.com/fusengine/kimi-code/tree/main/plugins/tanstack-start-expert/skills/start-deployment
Command: npx skills add https://github.com/fusengine/kimi-code --skill start-deployment-fusengine

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Deploying a TanStack Start app requires choosing the correct adapter, wiring the right Vite plugin order, matching package.json scripts to the build output, and avoiding the classic production bug of reading process.env at module scope, which breaks on edge runtimes and can leak secrets into client bundles. ## Core Features & Use Cases - Per-host adapter configs: Complete vite.config.ts templates for Cloudflare Workers (@cloudflare/vite-plugin + wrangler.jsonc), Netlify (@netlify/vite-plugin-tanstack-start), and Nitro-based targets (Vercel, Node, Docker, Bun, Railway). - Static prerendering: Configure tanstackStart({ prerender }) with routes globs, crawlLinks, and autoStaticPathsDiscovery, including which route types are excluded from auto-discovery. - Production env-var rules and checklist: Enforce per-request process.env reads, correct plugin ordering, React 19 pinning for Bun, and a pre-deploy checklist. - Use Case: You are shipping a TanStack Start app to Cloudflare Workers and your secrets are undefined in production. This Skill identifies the module-scope env read, fixes the plugin order, and provides the full wrangler.jsonc and deploy scripts. ## Quick Start Deploy my TanStack Start app to Cloudflare Workers and fix my vite.config.ts and wrangler setup.

Frequently Asked Questions about start-deployment

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

FAQPage Schema
How do I deploy a TanStack Start app to Cloudflare Workers?▼

Use @cloudflare/vite-plugin with viteEnvironment set to 'ssr', placed before tanstackStart() in the plugins array, plus a wrangler.jsonc pointing main at @tanstack/react-start/server-entry. Deploy with wrangler deploy instead of a node start script.

How to configure vite.config.ts for TanStack Start hosting?▼

Each host uses a different adapter: nitro/vite for Node, Vercel, and Railway, nitro with preset 'bun' for Bun, @netlify/vite-plugin-tanstack-start for Netlify, and @cloudflare/vite-plugin for Cloudflare Workers. All combine with tanstackStart() and @vitejs/plugin-react.

Why is process.env undefined on Cloudflare Workers?▼

Cloudflare injects environment variables and bindings at request time, so reading process.env at module scope evaluates before any request exists and returns undefined. Move the read inside the request handler or function body.

Does TanStack Start support static prerendering of dynamic routes?▼

Param routes like $userId, layout routes prefixed with _, and component-less routes are excluded from automatic prerendering. They are only generated if listed explicitly in the prerender routes option or linked from another page with crawlLinks enabled.

Can I deploy TanStack Start on Bun?▼

Yes, use the Nitro layer with nitro({ preset: 'bun' }) in vite.config.ts. You must pin react and react-dom to version 19 or higher, otherwise the Bun build fails.

When should I not use the Nitro adapter for TanStack Start?▼

Do not use Nitro when targeting Cloudflare Workers or Netlify, since both have dedicated Vite plugins. Mixing a Nitro node start script with a Cloudflare build produces a mismatched output that will not run.