Native federation v4 | RC3! 🎉 #11
Aukevanoost
announced in
Announcements
Replies: 1 comment 3 replies
|
I really love the example you have put together. I'm also very excited for your official documentation site (this will be a huge convenience instead of pointing folks at articles). A couple of questions:
|
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We are back!
Now that the new orchestrator is available in the v4 repository, this RC is focussed on integrating the orchestrator fully in the new ecosystem! And that includes adding SSE. Furthermore we added some goodies to increase performance (fully opt-in of course).
What's Changed
Core library and Angular adapter
Orchestrator
New features
The dense chunking feature is allowing for more compact remoteEntry.json files. But it's more than that, dense chunking allows for more fine-grained control over code splitting in general. The new settings look a bit like this in your Angular.json:
{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "mfe1": { // [..] other settings "architect": { "build": { "builder": "@angular-architects/native-federation-v4:build", "options": { "cacheExternalArtifacts": false, "chunks": { "enable": true, "dense": true } // <-- Allows for disabling/enabling chunks and switching to dense mode }, "configurations": { "production": { "target": "mfe1:esbuild:production" }, "development": { "target": "mfe1:esbuild:development", "dev": true } }, "defaultConfiguration": "production" }, "serve": { "builder": "@angular-architects/native-federation-v4:build", "options": { "target": "mfe1:serve-original:development", "cacheExternalArtifacts": true, "rebuildDelay": 0, "chunks": { "enable": true, "dense": true }, // <-- Allows for disabling/enabling chunks and switching to dense mode "dev": true, "port": 0 } }, // [...] Other builders } },More info can be found in issue #5.
ShareScope is a feature that allows for shared scopes instead of 1 single global scope. This can be handy if you want to scope your shared externals per framework major as can be seen in the federation.config.js:
read more on it in isssue #3.
Feedback
This community lives on feedback! Feel free to try out and experiment with the RC3 setup in your MFE ecosystem! An example for a small setup can be found here: https://github.com/Aukevanoost/native-federation-examples-ng/tree/v4
The future
What do you miss in native-federation? The next months you can expect a finalization and refinement of v4 to be prod-ready. We're planning on a big v4 release together with Angular 22. We will also start a central docs website where all (new) features will be explained like dense chunking.
❤️ The native-federation team
All reactions