Menu

Projects can now be configured with vercel.toml - Vercel
📰

Projects can now be configured with vercel.toml - Vercel

Vercel News·Michael J. Sullivan·about 1 hour ago
#JBrSfPao
#vercel#toml#frontend#backend#configuration
Reading 0:00
15s threshold

Vercel now supports vercel.toml, which allows you to to configure your project using the TOML configuration format. All of the same configuration properties are supported as in vercel.json, but it supports comments and has a flatter structure.

All projects can now use vercel.toml. Use only one project configuration file: vercel.toml, vercel.json, or vercel.ts.

For example, configuring Services:

"$schema" = "https://openapi.vercel.sh/vercel.json"

# NextJS frontend

[services.frontend]

root = "frontend/"

# FastAPI backend

[services.backend]

root = "backend/"

entrypoint = "main:app"

[[rewrites]]

source = "/api/(.*)"

destination = { service = "backend" }

[[rewrites]]

source = "/(.*)"

destination = { service = "frontend" }

Read the documentation.