core icon indicating copy to clipboard operation
core copied to clipboard

ModuleFederationPlugin makes the build really slow

Open HaasStefan opened this issue 4 weeks ago • 4 comments

Describe the bug

I am working on a massive Angular codebase with a custom webpack config. We already have slow builds by default and I am spiking on using Module Federation for incremental builds to improve build performance of our main app. However, I have found that using the ModuleFederationPlugin with just one remote and no shared config already adds so much overhead to the webpack build, that this scenario is infeasible.

With ModuleFederation Without ModuleFederation
Cold 37min 21min
Hot 17min 8min

I am using Webpack 5 and Module Federation enhanced v0.22.0

I have disabled split chunks when using Module Federation as that resulted in runtime module resolution errors. But besides that, the only difference is the usage of the ModuleFederationPlugin

Question: Is this expected in a large codebase, or is this likely a misconfiguration?

Reproduction

Used Package Manager

pnpm

System Info

-

Validations

HaasStefan avatar Jan 08 '26 13:01 HaasStefan