diff --git a/src/index.js b/src/index.js index c243ce82..2011c6d4 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,7 @@ const electron = require('electron'); // eslint-disable-line const isDev = require('electron-is-dev'); +const path = require('path'); +const url = require('url'); const menu = require('./menu'); @@ -18,7 +20,11 @@ function createWindow() { mainWindow = new BrowserWindow({ darkTheme: true, }); - mainWindow.loadURL(`file://${__dirname}/index.html`); + mainWindow.loadURL(url.format({ + pathname: path.join(__dirname, 'index.html'), + protocol: 'file:', + slashes: true, + })); mainWindow.on('closed', () => { // Dereference the window object, usually you would store windows