Managing microfrontends

Microfrontends are available in Limited Beta to Enterprise plans

With a project's Microfrontends settings of the Vercel dashboard, you can:

You can also use the Vercel toolbar to manage microfrontends.

To add projects to a microfrontends group:

  1. Visit the Settings tab for the project that you would like to add or remove.
  2. Click on the Microfrontends tab.
  3. Find the microfrontends group that it is being added to and Click Add to Group.

These changes will take effect on the next deployment.

Add the current project to a microfrontends group.
Add the current project to a microfrontends group.

To remove projects from a microfrontends group:

  1. Remove the microfrontend from the microfrontends.json in the default application.
  2. Visit the Settings tab for the project that you would like to add or remove.
  3. Click on the Microfrontends tab.
  4. Find the microfrontends group that the project is a part of. Click Remove from Group to remove it from the group.

Make sure that no other microfrontend is referring to this project. These changes will take effect on the next deployment.

Projects that are the default application for the microfrontends group can only be removed after all other projects in the group have been removed. A microfrontends group can be deleted once all projects have been removed.

To share settings between Vercel microfrontend projects, you can use the Vercel Terraform Provider to synchronize across projects.

Shared Environment Variables allow you to manage a single secret and share it across multiple projects seamlessly.

To use environment variables with the same name but different values for different project groups, you can create a shared environment variable with a unique identifier (e.g., FLAG_SECRET_X). Then, map it to the desired variable (e.g., FLAG_SECRET=$FLAG_SECRET_X) in your .env file or build command.

This feature is currently only supported for Next.js.

To optimize performance of cross-microfrontend navigations, add the PrefetchCrossZoneLinks element to your layout.tsx or layout.jsx file in all your microfrontend applications:

app/layout.tsx
import {
  PrefetchCrossZoneLinks,
  PrefetchCrossZoneLinksProvider,
} from '@vercel/microfrontends/next/client';
 
export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body>
        <PrefetchCrossZoneLinksProvider>
          {children}
        </PrefetchCrossZoneLinksProvider>
        <PrefetchCrossZoneLinks />
      </body>
    </html>
  );
}

Then in all microfrontends, use the Link component from @vercel/microfrontends/next/client anywhere you would use a normal link to automatically use the prefetching and prerendering optimizations.

import { Link } from '@vercel/microfrontends/next/client';
 
export function MyComponent() {
  return (
    <>
      <Link href="/docs">Docs</Link>
    </>
  );
}

By default, observability data from Speed Insights and Analytics is routed to the default application. You can view this data in the Speed Insights and Analytics tabs of the Vercel project for the microfrontends group's default application.

Microfrontends also provides an option to route a project's own observability data directly to that Vercel project's page.

  1. Ensure your Speed Insights and Analytics package dependencies are up to date. For this feature to work:
    • @vercel/speed-insights (if using) must be at version 1.2.0 or newer
    • @vercel/analytics (if using) must be at version 1.5.0 or newer
  2. Visit the Settings tab for the project that you would like to change data routing.
  3. Click on the Microfrontends tab.
  4. Search for the Observability Routing setting.
  5. Enable the setting to route the project's data to the project. Disable the setting to route the project's data to the default application.
  6. The setting will go into effect for the project's next production deployment.

Enabling or disabling this feature will not move existing data between the default application and the individual project. Historical data will remain in place.

Last updated on June 25, 2025