Vercel Introduces vercel.ts as Typed Replacement for vercel.json
Vercel now recommends vercel.ts, a TypeScript file that replaces the static vercel.json for configuring projects. The file exports a typed config object covering build settings, routing, headers, and cron jobs, so mistakes like misspelled keys or invalid cron strings fail the build instead of being silently ignored. Because it is executable code evaluated at build or deploy time, it can read environment variables and vary settings per environment, which a pure JSON file cannot do. It does not run per request, so request-time logic still belongs in Next.js Middleware or Routing Middleware. The format is built on the @vercel/config package and is intended to replace the schema-less JSON configuration used since the platform's early days.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in