We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15bc93c commit 3c4e1bfCopy full SHA for 3c4e1bf
main.ts
@@ -4,6 +4,7 @@ import * as path from 'path';
4
let win, serve;
5
const args = process.argv.slice(1);
6
serve = args.some(val => val === '--serve');
7
+import * as url from 'url';
8
9
if (serve) {
10
require('electron-reload')(__dirname, {
@@ -24,7 +25,11 @@ function createWindow() {
24
25
});
26
27
// and load the index.html of the app.
- 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
+ }));
33
34
// Open the DevTools.
35
0 commit comments