agentsclimarketplace

Start deployment

Skill fusengine/agents/plugins/tanstack-start-expert/skills/start-deployment

Use when: building or deploying a TanStack Start app — Nitro/Vite build, official adapters (Cloudflare Workers, Netlify, Vercel, Node, Bun, Railway), static prerendering (tanstackStart prerender), production env vars, or a deploy checklist. Do NOT use for: app data/auth logic (see start-routing-data / start-auth) or generic Vite config unrelated to Start.From its SKILL.md

Install
npx -y skills add fusengine/agents --skill start-deployment

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

4.2 KB, 930 tokens by cl100k_base, as published. Nobody here has run it

TanStack Start — Deployment

Agent Workflow (MANDATORY)

Before ANY implementation, spawn in parallel:

  1. fuse-ai-pilot:explore-codebase — read vite.config.ts, package.json scripts, existing adapter/wrangler config
  2. fuse-ai-pilot:research-expert — verify adapter setup via Context7 /websites/tanstack_start_framework_react
  3. mcp__context7__query-docs — confirm tanstackStart plugin + adapter options for the target host

After implementation, run fuse-ai-pilot:sniper.


Overview

TargetSetup
Cloudflare Workers ⭐@cloudflare/vite-plugin (viteEnvironment: { name: 'ssr' }) + wrangler.jsonc
Netlify ⭐@netlify/vite-plugin-tanstack-start
Vercel / Node / Docker / Bun / RailwayNitro layer (nitro/vite), .output/server/index.mjs
StatictanstackStart({ prerender: { routes, crawlLinks } })

Start builds with Vite (or Rsbuild). Most hosts go through Nitro, an agnostic deploy layer; Cloudflare and Netlify have dedicated Vite plugins.


Critical Rules

  1. Read env per request — process.env.X inside handlers, NEVER at module scope; Cloudflare injects env at request time, so module reads are undefined on the edge.
  2. Cloudflare plugin order — cloudflare({ viteEnvironment: { name: 'ssr' } }) before tanstackStart() in the plugins array.
  3. Match start to the build — Nitro output starts with node .output/server/index.mjs; Cloudflare uses wrangler deploy (no node start).
  4. React 19 for Bun — pin react/react-dom to >= 19 when deploying on Bun.
  5. Prerender excludes dynamics — param routes ($id), layout routes (_), and component-less routes are skipped unless linked with crawlLinks.

Architecture

vite.config.ts        # tanstackStart() + host adapter (cloudflare / netlify / nitro)
wrangler.jsonc        # Cloudflare only — main: @tanstack/react-start/server-entry
package.json          # scripts differ per target (deploy vs start)
.output/server/       # Nitro build output (Node/Vercel/Bun/Railway)

→ See vite-config-adapters.md for every adapter config


Reference Guide

Concepts

TopicReferenceLoad when
Build & adaptersbuild-and-adapters.mdChoosing/configuring a host (Nitro, Vercel, Node, Bun, Railway, Netlify)
Cloudflarecloudflare.mdDeploying to Cloudflare Workers
Prerenderingprerendering.mdGenerating static HTML at build time
Env & checklistenv-and-checklist.mdProduction env vars + pre-deploy checklist

Templates

TemplateWhen to Use
vite-config-adapters.mdFull vite.config.ts per target + prerender
cloudflare-deploy.mdComplete Cloudflare Workers setup

Best Practices

DO

  • Confirm the official partner list (Cloudflare, Netlify, Railway) before hand-rolling config
  • Keep secrets in the host's env store; read them per request
  • Prerender marketing/blog routes; keep dynamic/auth routes SSR

DON'T

  • Read process.env at import time (edge = undefined; bundle leak)
  • Mix a Nitro node start script with a Cloudflare build
  • Expect $param routes to prerender without crawlLinks

What ships with it: 6 files

17.5 KB alongside SKILL.md

Keep looking

Skills are one crate of 611,884. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.