1

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:

enter image description here

During debugging I noticed a few things

  1. All code from app.component.ts got executed
  2. Code from main.ts got executed up until the point where app should be bootstrapped:
 platformBrowserDynamic().bootstrapModule(AppModule).catch((error) => {
  1. App only builds "white screen" with ng serve (development build), but builds fine on ng 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.

NeNaD
  • 18,172
  • 8
  • 47
  • 89
  • You can check [this](https://stackoverflow.com/questions/54879588/what-will-happen-if-sourcemap-is-set-as-false-in-angular) link. It is useful for debugging purpose, not sure what it has to do with the app rendering. There might be some config issue which should be changed. IVY rendering is enabled/disabled? – Apoorva Chikara Nov 10 '21 at 05:59
  • It would be useful if you could share the whole angular.json since it looks like some problem with the project's configuration. – Tonnio Nov 10 '21 at 15:53
  • I checked that already and as I understand it should not change anything except it would also generate source map. I don't know why app is building "white screen" only with that option set to true. I started happening after upgrade to v12. Ivy is enabled. @ApoorvaChikara – NeNaD Nov 11 '21 at 21:37

0 Answers0