In order to render my Angular app inside Electronjs, I had to change the target (in tsconfig.json) from es2015 to es5. Otherwise it's a blank screen. Most tutorials say to do so, but I don't understand why. What are the reasons? Thank you.
Asked
Active
Viewed 254 times
0
-
1It's not necessary. Could you provide more information please? Maybe github repo with an example? – vadimk7 Jul 22 '20 at 16:59
-
Look in github, there is many sample apps, all of them have target es5, otherwise it won't work, it leads to blank screen. Example: https://github.com/rabehasy/angular-electron/blob/start/tsconfig.json – Anas EL HAJJAJI Jul 22 '20 at 17:11
1 Answers
0
It's because since Angular 8 target defines differential loading process (enable es modules for modern browsers) and Electron can't load it via file://
protocol without MIME type by HTML specification. For more information dig here
Nevertheless if you want to use es2015 target just update Electron to the latest version.

vadimk7
- 6,559
- 1
- 12
- 15