Technology1 min read

Projects can now be configured with vercel.toml

By · Published by Everything Blog

In short

The new configuration option is accessible across all projects and supports identical properties to the traditional JSON format. Teams can utilize it to define application features such as services and rewrites. However, projects are restricted to using a single configuration file chosen from the supported options.

Key points

  • Projects are strictly limited to using a single configuration file to manage settings.: Projects are strictly limited to using a single configuration file to manage settings.
  • Developers must choose between vercel.toml, vercel.json, or vercel.ts when configuring th…: Developers must choose between vercel.toml, vercel.json, or vercel.ts when configuring their projects.
  • Teams looking for clearer file documentation can use TOML to leave comments directly insi…: Teams looking for clearer file documentation can use TOML to leave comments directly inside their project configuration.

Sources checked by our analysis pipeline: 1

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:

vercel.toml

"$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.

Technology