Menu

Introducing vercel.ts: Programmatic project configuration - Vercel
📰
0

Introducing vercel.ts: Programmatic project configuration - Vercel

Vercel News·Pranav Karthik·4 days ago
#HHUlVoNN
Reading 0:00
15s threshold

Vercel now supports vercel.ts , a new TypeScript-based configuration file that brings type safety, dynamic logic, and better developer experience to project configuration. vercel.ts lets you express configuration as code by defining advanced routing, request transforms, caching rules, and cron jobs, going beyond what static JSON can express. In addition to full type safety, this also allows access to environment variables, shared logic, and conditional behavior. All projects can now use vercel.ts (or .js , .mjs , .cjs , .mts ) for project configuration. Properties are defined identically to vercel.json and can be enhanced using the new @vercel/config package. import { type VercelConfig , routes , deploymentEnv } from '@vercel/config/v1' ; export const config : VercelConfig = { framework : 'nextjs' , crons : [ { path : '/api/cleanup' , schedule : '0 0 * * *' } , { path : '/api/sync-users' , schedule : '*/15 * * * *' } , ] , rewrites : [ routes .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More