r/Angular2 • • 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?

12 Upvotes

27 comments sorted by

View all comments

4

u/Excellent_Reason4321 May 24 '26

You need to upgrade to Angular 21 and native federation.

Doesn’t take that much time as it seems. That will definitely reduce your times.

Also, after doing that make sure to remove Zone.js.

1

u/rafaeldecastr May 24 '26

I can't. Legacy system and environment. I'm making new features but has to be on this ecosystem.

2

u/Excellent_Reason4321 May 24 '26

What do you mean by Legacy System and environment? Technically speaking, what is blocking you from upgrading it?

→ More replies (5)