Skip to content

Commit b7cc405

Browse files
author
Maxime GRIS
committed
2 parents b8cf343 + 8502712 commit b7cc405

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Your built files are in the /dist folder.
7575

7676
|Command|Description|
7777
|--|--|
78-
|`npm run start:web`| Execute the app in the brower |
78+
|`npm run start:web`| Execute the app in the browser |
7979
|`npm run electron:linux`| Builds your application and creates an app consumable on linux system |
8080
|`npm run electron:windows`| On a Windows OS, builds your application and creates an app consumable in windows 32/64 bit systems |
8181
|`npm run electron:mac`| On a MAC OS, builds your application and generates a `.app` file of your application that can be run on Mac |

main.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as path from 'path';
44
let win, serve;
55
const args = process.argv.slice(1);
66
serve = args.some(val => val === '--serve');
7+
import * as url from 'url';
78

89
if (serve) {
910
require('electron-reload')(__dirname, {
@@ -24,7 +25,11 @@ function createWindow() {
2425
});
2526

2627
// and load the index.html of the app.
27-
win.loadURL('file://' + __dirname + '/index.html');
28+
win.loadURL(url.format({
29+
protocol: 'file:',
30+
pathname: path.join(__dirname, '/index.html'),
31+
slashes: true
32+
}));
2833

2934
// Open the DevTools.
3035
if (serve) {

0 commit comments

Comments
 (0)