Packages

@vercel/microfrontends

2.4.2 · 20 Oct 20261.8M / weekRepositoryHomepagenpmAtom feed

Your version

1.4.0

25 Jun 2025Where it was published

1.5.0 is the newest release of 1.x.

In short

1 new

Release note

The section about @vercel/microfrontends of a note shared by several packages.

Minor Changes

  • Improve PrefetchCrossZoneLinksProvider performance.

    • Stops components using this context from rerendering every time prefetchHref is called on an unseen href.

    • Batches multiple prefetch calls together before causing a new render.

    • Improve MicrofrontendConfigClient caching.

      • Reuses clients when calling MicrofrontendConfigClient.fromEnv() with the same parameters as a previous call. This improves the hit rate of the path cache when there aren't dynamic paths.

      • Caches the hasDynamicPaths check so that it doesn't need to be recalculated for each use of the hook.

      • When the promise for the server-fetched config resolves, it stores a cached copy of that directly in a new variable so that future invocations of useClientConfig() can have the correct config in their initial render.

      • Adds a regexpCache to cache the resulting regex for each path, to avoid calling pathToRegexp in most cases beyond the initial few links.

    • Remove the custom @vercel/microfrontends Image component.

      • The wrapper around Next.js Image is no longer needed, as the vercel proxy now handles image optimisation request routing for microfrontends.

      • If you are currently importing { Image } from '@vercel/microfrontends/next/client' you can replace this with Image from 'next/image'.

    • Use defineServer instead of custom webpack EnvironmentPlugin when the version of Next.js is new enough to support it.

      • vercel/next.js#79225 added support to Next.js for defining server-only compile-time constants independent of the bundler.

        • Like compiler.define, this allows users to create compile-time constants both Turbopack and webpack from a single API. compiler.defineServer instead only makes these constants available for server or edge environments, not the client environment.

      • The new behaviour is used by default when the version of Next.js is new enough to support it. Otherwise the custom webpack EnvironmentPlugin is used.

      • Optionally, you can specify preferWebpackEnvironmentPlugin. This will use the legacy webpack.EnvironmentPlugin instead of Next.js's defineServer option, even when Next.js is new enough to support it.

    • Remove support for projectId in microfrontends.json.

      • projectId was deprecated in a previous release. This release removes support for the field entirely.

      • If you are still using projectId, see the previous release notes in CHANGELOG.md for removing it.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.