Skip to content

Commit

Permalink
fix: app not loading with Electron v11
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Jan 14, 2021
1 parent 5a4b2b7 commit 1444bf0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion generators/app/templates/_.gitignore
Expand Up @@ -16,7 +16,8 @@
/platforms

# Electron
/dist.electron
/dist-electron
/dist-packages
/electron.main.js

# IDEs and editors
Expand Down
2 changes: 1 addition & 1 deletion generators/app/templates/__electron.electron.main.ts
Expand Up @@ -24,7 +24,7 @@ function createWindow() {
mainWindow.loadURL('http://localhost:4200');
} else {
// Load the index.html of the app.
mainWindow.loadFile('dist.electron/index.html');
mainWindow.loadFile('dist-electron/index.html');
}
}

Expand Down
2 changes: 1 addition & 1 deletion generators/app/templates/_package.json
Expand Up @@ -44,7 +44,7 @@
"electron:compile": "tsc --project tsconfig.electron.json",
"electron:run": "<%= run('electron:compile') %> && electron .",
"electron:build": "<%= run('electron:compile') %> && <%= run('write:env') %> && ng build --prod --base-href ./ --output-path dist-electron",
"electron:package:common": "electron-packager . --overwrite --out=dist.packages --ignore=\"/(platforms|plugins|docs|www|reports|e2e|src)\"",
"electron:package:common": "electron-packager . --overwrite --out=dist-packages --ignore=\"/(platforms|plugins|docs|www|reports|e2e|src)\"",
<% if (props.desktop.includes('windows')) { -%>
"electron:package:windows": "<%= run('electron:package:common') %> -- --platform=win32 --arch=x64 --icon=./resources/win/icon.ico",
<% } -%>
Expand Down
2 changes: 1 addition & 1 deletion generators/app/templates/docs/__electron.electron.md
Expand Up @@ -53,7 +53,7 @@ Alternatively, you can build a package for one specific target platform using:
npm run electron:package:<windows|mac|linux>
```

The build packages will be then located in the `dist.packages` folder.
The build packages will be then located in the `dist-packages` folder.

> Note: in order to build Windows packages from non-Windows platform, you need to install
> [Wine](https://www.winehq.org) 1.6 or later.
Expand Down

0 comments on commit 1444bf0

Please sign in to comment.