Reader

Sync projects with @vercel/related-projects

| Vercel News | Default

The new @vercel/related-projects package helps sync deployment information across separate Vercel projects, ensuring your applications always reference the latest preview or production deployment URLs without manual updates or environment variable changes.

Previously, developers had to manually enter deployment URLs, manage connection strings, or use environment variables to keep the projects communicating effectively. Now, this data is automatically available and updated at both build and runtime.

For example, a monorepo containing:

  • A frontend Next.js project that fetches data from an API

  • An backend Express.js API project that serves the data

Related Projects can now ensure that each preview deployment of the frontend automatically references the corresponding preview deployment of the backend, avoiding the need for hardcoded values when testing changes that span both projects.

Related Projects are linked using a Vercel project ID. You can find your project ID in the project Settings page in the Vercel dashboard.

Learn more about linking related projects.

Read more