Closed
Description
🐞 Bug report
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Is this a regression?
No, breaks after moving to webpack 5
Description
An Angular 11 app with webpack 5 breaks after recompilation (for changes on certain files)
Cannot find module '@angular/core'
at webpackMissingModule ...
🔬 Minimal Reproduction
- git clone https://github.com/difference-engine/ng-webpack5-missing-module.git
- cd ng-webpack5-missing-module
- yarn
- yarn start
- (go to http://localhost:4200/)
- (edit app.module.ts and save)
- refresh browser window, and you should see the error
- (interestingly, doing the same with app.component.html or app.component.ts doesn't break things)
🔥 Exception or Error
🌍 Your Environment
Angular CLI: 11.1.2
Node: 14.15.1
OS: linux x64
Angular: 11.1.1
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1101.2
@angular-devkit/build-angular 0.1101.2
@angular-devkit/core 11.1.2
@angular-devkit/schematics 11.1.2
@angular/cli 11.1.2
@schematics/angular 11.1.2
@schematics/update 0.1101.2
rxjs 6.6.3
typescript 4.0.5
Anything else relevant?
Originally I had posted this on webpack webpack/webpack#12561
reason for my suspicion was this recent change to rebuildModule
in webpack 5 -> webpack/webpack#11433
and the dependency of AngularWebpackPlugin
on rebuildModule
But my understanding of both the tools is fairly limited, and webpack folks think this might be a deeper incompatibility with webpack 5