This seemed to happen due to default Ivy engine configuration with Angular 11.
I disabled the enableIvy
flag in tsconfig.json file like this :
"angularCompilerOptions": { "enableIvy": false, "allowEmptyCodegenFiles": true }
A friend suggested that AOT with ivy configuration must be avoided in dev environment to avoid this kind of issues.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…