Webpack 5 / Module Federation
See original GitHub issueDescription
Webpack 5 has a new feature called Module Federation (I’m sure it’s caught some folks’ attention by now), allowing you to at runtime import parts of bundles from other applications. I could see this slotting into nx
quite neatly, for example by allowing the exposes
property of the plugin to be set in nx.json
:
{
"projects": {
"chrome": {
"exposes": {
"AppContainer": "src/App.tsx"
},
"tags": []
},
"chrome-e2e": {
"tags": [],
"implicitDependencies": ["chrome"]
},
"settings": {
"tags": [],
"exposes": {
"Settings": "src/Settings.tsx"
}
}
}
}
I tried looking for an existing issue but couldn’t find any, so thought it would be worth bringing up. Would love to hear what you think about Module Federation in general, and what it could mean for NX. Thanks ❤️
Some links:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:64
- Comments:36 (6 by maintainers)
Top Results From Across the Web
Module Federation - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Building micro-frontends with webpack's Module Federation
Learn to simplify app architecture by using webpack 5's Module Federation to consume and share micro-frontend components with a Vue example.
Read more >Webpack 5 module federation for Micro-frontend Architecture
Webpack 5 module federation is a way provided by Webpack team to load multiple micro applications(remote applications) into another application(host ...
Read more >Module Federation
The Practical Guide to Module Federation. "Practical Module Federation" is the first, and only, book on Webpack 5's innovative new live code sharing...
Read more >What Is Webpack Module Federation and Why Does It Matter?
Module Federation is one of the most exciting features in Webpack 5 and is considered a game-changer in JavaScript architecture.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@firxworx / @vitorcamachoo / @agoncharuks / @georgewilde / @elenasch / @vanuj:
Webpack 5 is on the Nx roadmap, slated for release with version 13 in October of this year.
Agree with @Vynlar. This would be a huge game changer in terms of creating isolated buildable and deployable apps which can then be part of a single and larger SPA.