r/Angular2 • u/rafaeldecastr • May 24 '26
Help Request Micro-frontend (module federation), Angular 15 with 2m40 build time and 45s recompile update each "save" I made.
On my new job, I got a MF project with these specs.
I cleaned and simplified it for testing. (Lazy loaded, duplicate imports...)
The host now, has only 3 remote routes to point.
Each remote has NOTHING, just a shell.
The bundle/recompile is still huge and slow.
Right now, as I'm writing this, I can't post code. But I can't get this question out of my head... why, how?
I tried using Claude, but I didn't have much success. The build time reduced to 1 minute 10 seconds, but the recompile is still at 30 seconds.
I knownits a long ahot whitout code, but can you tell me what I should look at to optimize this?
View all comments
Show parent comment
2
u/huysolo May 24 '26
Then you’re in bad luck, my friend. Your best bet is to convert into the new angular version with esbuild, which will help to reduce the compile time into about 8 seconds each remote app. Otherwise there is not much you can do so let your boss know about the trade off. The bundle size will always be at least 100 times more compared to SPA. You cannot optimize a flaw out of its own concept.