diff options
author | Akshit Kr Nagpal <akshitkrnagpal@gmail.com> | 2018-05-24 19:32:27 +0530 |
---|---|---|
committer | Saúl Ibarra Corretgé <s@saghul.net> | 2018-05-24 16:02:27 +0200 |
commit | ff3b9d9251d10c34123021d6e67a4699ebcac5f4 (patch) | |
tree | e696cff2d710789887512cb568a27900a0c7eb36 /main.js | |
parent | 42be5336146a0d7a3d2c448107e3025e2c553928 (diff) |
Added production config and fixed pack script (#32)
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -4,6 +4,8 @@ const electron = require('electron'); const APP = electron.app; const BrowserWindow = electron.BrowserWindow; +const isDev = require('electron-is-dev'); + const { setupAlwaysOnTopMain } = require('jitsi-meet-electron-utils'); @@ -11,11 +13,17 @@ const { const path = require('path'); const URL = require('url'); + +/** + * Path to root directory + */ +const basePath = isDev ? __dirname : electron.app.getAppPath(); + /** * URL for index.html which will be our entry point. */ const indexURL = URL.format({ - pathname: path.resolve(__dirname, './build/index.html'), + pathname: path.resolve(basePath, './build/index.html'), protocol: 'file:', slashes: true }); |