Issue description
I recently upgraded Angular app from v11
to v12
. The whole upgrading process finished successfully without errors. However, when I build my application, application bootstraps as "white screen", and there are NO errors in the console.
The result is empty <router-outlet>
tag:
During debugging I noticed a few things
- All code from
app.component.ts
got executed - Code from
main.ts
got executed up until the point where app should be bootstrapped:
platformBrowserDynamic().bootstrapModule(AppModule).catch((error) => {
- App only builds "white screen" with
ng serve
(development build), but builds fine onng build
(production build)
Reason of the issue
After 2 days of debugging I noticed that when I remove "sourceMap": true
config from angular.json
file, application builds fine with ng serve
(development build) as well.
Question
Does anyone know why application builds "white screen" with "sourceMap": true
config and how to prevent it? I would like to keep that config because of debugging purposes.