You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After this fix 20.3.9 the build time increased again. Also with reference to #13 it is this step which takes some time
****
for my application around 10 seconds. This seems to be the same times as before version 20.3.8 which was decreased maybe through the bug #17 and now after the fix it is the same but the terminal output shows more information
Right, so the rebuilding step is taking 10 seconds?
The reason is actually pretty simple, the cached files were not being invalidated. That's why it was so fast. Whenever we invalidate a cached file, it is being rebuild by angular.
So the real issue is, we can't see (yet) with Angular which files are being changed. It happens somewhere deep in Angular. I've created A pull request to share the cache with Angular but right now it's not possible to share the cache, thus files are not automatically invalidated when you change a file. angular/angular-cli#32527
Since we don't know which file changed, our only bet is to invalidate all "source" files. I'd like to know from you, how long does a rebuild take and how many files are being rebuild? you can go to your node_modules/@angular-architects/src/utils/angular-esbuild-adapter.js and set a console.log(opts.modifiedFiles.length) at line 94.
I hope my PR get's implemented in Angular 22 because it will save us a lot of build time.
the application has one shell and one remote. The shell uses two internal libraries and the remote one. In my federation.config.js I use: sharedMappings: [] to prevent the library from being shared
Activity
Aukevanoost commentedon Mar 25, 2026
Right, so the rebuilding step is taking 10 seconds?
The reason is actually pretty simple, the cached files were not being invalidated. That's why it was so fast. Whenever we invalidate a cached file, it is being rebuild by angular.
angular-adapter/packages/angular/src/utils/angular-esbuild-adapter.ts
Lines 139 to 141 in 8dd6bdf
So the real issue is, we can't see (yet) with Angular which files are being changed. It happens somewhere deep in Angular. I've created A pull request to share the cache with Angular but right now it's not possible to share the cache, thus files are not automatically invalidated when you change a file.
angular/angular-cli#32527
Since we don't know which file changed, our only bet is to invalidate all "source" files. I'd like to know from you, how long does a rebuild take and how many files are being rebuild? you can go to your
node_modules/@angular-architects/src/utils/angular-esbuild-adapter.jsand set aconsole.log(opts.modifiedFiles.length)at line94.I hope my PR get's implemented in Angular 22 because it will save us a lot of build time.
ladler1 commentedon Mar 26, 2026
Thanks for the explanation. Yes the rebuild takes 10 second. I have added the console logs for time and number of files:
INFO Re-bundling all internal libraries and exposed modules..'
Modified files: 1046
[build] ESBuild rebuild for 'mapping-or-exposed': 10.263s
Regarding the made observations that sound really promising from my point of view and would be essential for a good development experience.
Aukevanoost commentedon Apr 1, 2026
Right, thanks! One more question for now, are you using multiple shared internal libraries? Or is this all from a single remote.
ladler1 commentedon Apr 2, 2026
the application has one shell and one remote. The shell uses two internal libraries and the remote one. In my federation.config.js I use:
sharedMappings: []to prevent the library from being sharedAukevanoost commentedon Apr 6, 2026
Closing this issue for now, keep track on our future enhancements here https://github.com/orgs/native-federation/discussions/36