Urgent.News

What's breaking now, across thousands of outlets.

Tech

Native Federation - Deep Dive - Part 1/8 - The Mental Model, Why Native Federation Exists and What Changed in v4

Part 1 of an 8-part series on Native Federation - A deep dive. ๐Ÿค– A note on this article: I used Claude to help reformat and structure the content to make it clearer and more presentable for publication. If you've shipped a production micro-frontend system on webpack Module Federation, you already know the mental model: a host application lazy-loads code it never saw at compile time, from aโ€ฆ

Web developers often deploy micro-frontend systems that rely on webpack Module Federation, a model where a host application lazily loads code from remote sources at runtime. This mental model allows sharing of dependencies without shipping duplicate copies of code. However, the implementation was fraught with challenges, primarily due to webpack's runtime contract and tooling layer, which resulted in framework lock-in and migration complications.

Native Federation recognized these issues and decided to rebuild the model using web standards, specifically ECMA Script Modules and Import Maps, along with JSON manifests. This change enables genuine ES modules to be served directly to the browser, with shared dependencies resolved via import maps, rather than through a bundler's runtime.

This approach, while technically remarkable, allows for more flexibility and replaceability of the build tool, as the underlying contract doesn't depend on a specific bundler. The move to v4 of Native Federation marks a significant step in this direction, as it was restructured to be framework and bundler-agnostic, with its core, adapters, and orchestrator living under separate repositories.

This shift signifies a move towards a platform with published contracts between its layers, rather than a plugin with internal modules. This change not only addresses the limitations of the previous implementation but also signals a broader vision for where the Native Federation project and the dynamic module loading pattern are headed.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

Your Stack Has One Point of Failure. It's the Tool You Trusted Most.

Your Stack Has One Point of Failure. It's the Tool You Trusted Most. Three things hit Hacker News this week and they rhyme.

  • Three stories highlight businesses' trust in single dependencies
  • Hacker News reports ZCode, OpenAI, and South Korea breaches
  • Single point of failure can cause catastrophic issues

๐Ÿš€ Introducing WebCraft7767 โ€” Building Useful Websites, One Project at a Time

Hey everyone! ๐Ÿ‘‹ I'm starting something I've been wanting to build for a while: WebCraft7767 . It's a GitHub-based project showcase where Iโ€™ll be building and sharing free, practical websites and webโ€ฆ

  • WebCraft7767 is a GitHub project showcasing practical web development
  • FixFinder app helps locate repair technicians and services
  • Focus on learning through real projects and experimentation

More from Saturday 19 September โ†’