1. Configure React Router 7
Any React Router 7 Vite project builds and deploys automatically. To use per-route config (memory, maxDuration) or match an existing Vercel setup verbatim, keep vercelPreset() in react-router.config.ts:
import type { Config } from '@react-router/dev/config'import { vercelPreset } from '@vercel/react-router/vite'export default { ssr: true, presets: [vercelPreset()],} satisfies ConfigIf ssr: false is set, forkrail detects SPA mode and deploys the built client bundle as a zero-Lambda static site served directly from S3.
2. Deploy & configure caching
forkrail project my-rr-app --memory 1024forkrail deploy --prodTo cache loader responses at the regional router, return Cache-Control: public, s-maxage=60, stale-while-revalidate=300 (or CDN-Cache-Control) from your route headers export.
Routes declaring export const config = { runtime: 'edge' } are refused at build time — remove the runtime field to run them on Node 24 arm64. pnpm and Yarn workspaces are installed flat (node-modules) so server imports resolve reliably.
TanStack Start