Menu

Module Federation in Next.js 16 after nextjs-mf
📰

Module Federation in Next.js 16 after nextjs-mf

DEV Community: nextjs·Tariq Khan·about 5 hours ago
#P6JNo3FT
#devtonextjs#devto#dev#cart#remote
Long article (638 words) — no AI summary yet.
Reading 0:00
15s threshold

Say your storefront has a product page in app/ and an older page in pages/ . The cart team wants to update the Add to cart button on both pages this afternoon. Can they do that without putting a storefront redeploy on someone else’s calendar?

That’s the problem I built next-federation to solve. Next.js loads the button from a separately deployed app at runtime. The button uses the storefront’s cart context, so when you click it, the count in the header goes up. The cart team can ship a compatible update without rebuilding the storefront. Source on GitHub

If you’re coming from @module-federation/nextjs-mf , the old integration supported the webpack-based Pages Router and is now marked deprecated. I built this as an alternative for teams using the App Router or Pages Router on Next.js 16. The host can use Turbopack or webpack. You can move a remote first and migrate a route later.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.