aboutsummaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
authorSaúl Ibarra Corretgé <s@saghul.net>2018-08-16 10:58:56 +0200
committerSaúl Ibarra Corretgé <s@saghul.net>2018-08-17 23:06:46 +0200
commitc50e6344f7d9e59a7e28411de8878ecaf9fc58f3 (patch)
tree778aaece533d55ca2a379e81bb986c4e3cb3db6f /main.js
parent7c23809c2a08ecd75057fdd6aa717f3ba2f2790f (diff)
Add ability to watch / autoreload in development mode
Fixes: https://github.com/jitsi/jitsi-meet-electron/issues/103 Co-authored-by: Akshit Kr Nagpal <akshitkrnagpal@gmail.com>
Diffstat (limited to 'main.js')
-rw-r--r--main.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/main.js b/main.js
index 77b2bea..d2bcb61 100644
--- a/main.js
+++ b/main.js
@@ -21,9 +21,14 @@ autoUpdater.logger = require('electron-log');
autoUpdater.logger.transports.file.level = 'info';
/**
- * Load debug utilities (don't open the DevTools window by default though).
+ * When in development mode:
+ * - Load debug utilities (don't open the DevTools window by default though)
+ * - Enable automatic reloads
*/
-require('electron-debug')({ showDevTools: false });
+if (isDev) {
+ require('electron-debug')({ showDevTools: false });
+ require('electron-reload')(path.join(__dirname, 'build'));
+}
/**
* The window object that will load the iframe with Jitsi Meet.