-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Command
new
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
The @angular-devkit/build-angular is tied to version v5.104.1 of webpack which contains a bug that prevents an Angular app from being used in combination with Webpack Module Federation.
The related bug reports in webpack are:
- Module Federation crashes with production configuration in Angular 21 webpack/webpack#20332
- class extend value undefined is not a constructor or null webpack/webpack#20380
- [Bug Report] ModuleFederationPlugin with
library: { type: 'module' }produces broken shared chunks in v5.104.0+ webpack/webpack#20405
Minimal Reproduction
A reproduction repo can be found in the webpack/webpack#20405 issue.
Exception or Error
Your Environment
Angular CLI : 21.1.2
Angular : 21.1.2
Node.js : 24.13.0
Package Manager : npm 11.8.0
Operating System : win32 x64
┌───────────────────────────────┬───────────────────┬───────────────────┐
│ Package │ Installed Version │ Requested Version │
├───────────────────────────────┼───────────────────┼───────────────────┤
│ @angular-devkit/build-angular │ 21.1.2 │ ^21.1.1 │
│ @angular/build │ 21.1.2 │ ^21.1.1 │
│ @angular/cli │ 21.1.2 │ ^21.1.1 │
│ @angular/common │ 21.1.2 │ ^21.1.0 │
│ @angular/compiler │ 21.1.2 │ ^21.1.0 │
│ @angular/compiler-cli │ 21.1.2 │ ^21.1.0 │
│ @angular/core │ 21.1.2 │ ^21.1.0 │
│ @angular/forms │ 21.1.2 │ ^21.1.0 │
│ @angular/platform-browser │ 21.1.2 │ ^21.1.0 │
│ @angular/router │ 21.1.2 │ ^21.1.0 │
│ rxjs │ 7.8.2 │ ~7.8.0 │
│ typescript │ 5.9.3 │ ~5.9.2 │
│ vitest │ 4.0.18 │ ^4.0.8 │
└───────────────────────────────┴───────────────────┴───────────────────┘
Anything else relevant?
This is not a bug with the Angular CLI but I also didn't think it was a feature request so I was unsure how to report this.
What I'd like to request is for a new version of the Angular CLI to be pushed which updates the webpack dependency to the version that is not bugged: v5.105.0.
As a workaround, after creating an Angular app with ng new I can override the webpack version in the package.json with:
"overrides": {
"webpack": "5.105.0"
},
But it would be good if the non-bugged version of webpack was available by default after doing ng new.