I am building and running an Angular 8/Electron 5 desktop app. After what I believe to be proper setup, running the app displays a blank white screen.
Using:
Electr
I got my electron application to work by changing the target
in the tsconfig.json to es5
.
{
"compileOnSave": false,
"compilerOptions": {
"importHelpers": true,
"module": "esnext",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5", <-- HERE
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
Prior to this, I was getting the blank (white) screen too after updating the Angular 8. Seems now that Angular does a build in both es5
and es2015
, electron doesn't like that. I would guess this will be fixed in the future.
UPDATE 2019-10-24:
Looks like this was fixed in electron@7.0.0
. You can target es2015
with that version. Tested with @angular/cli@8.3.14
.