Search forkrail

Search documentation, comparisons, and CLI commands.

All frameworks/React Router
Websites & full-stack
Production ready

Deploy React Router 7 on forkrail

Deploy React Router 7 Vite apps with SSR, streaming loaders and actions, SPA mode, and @vercel/react-router vercelPreset() per-route configuration unchanged.

Adapter
Built-in Vite SSR builder + optional vercelPreset()
Runtime
Node.js 24 (arm64) or Static S3 (ssr: false)
Detection
package.json (@react-router/dev)
Memory
1,024 MB recommended for SSR
  • SSR & streaming
    Vite SSR with streaming loaders, actions, and prerendered routes
  • SPA mode
    ssr: false deploys automatically as a zero-Lambda static site
  • Per-route config
    vercelPreset() supports per-route memory and maxDuration
  • Skew & middleware
    Skew protection and root middleware.ts supported

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:

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 Config

If 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

Deploy React Router 7
forkrail project my-rr-app --memory 1024
forkrail deploy --prod

To 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.

Node runtime only (no Edge routes)

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.

Ready to deploy your React Router project inside your own AWS account?
Quickstart