main: Use import() syntax for electron-connect.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-07-01 14:55:00 -07:00
parent 24b28f9ded
commit 397a7381b8
2 changed files with 3 additions and 1 deletions

View File

@@ -1046,7 +1046,7 @@ window.addEventListener('load', async () => {
// Only start electron-connect (auto reload on change) when its ran
// from `npm run dev` or `gulp dev` and not from `npm start`
if (isDev && remote.getGlobal('process').argv.includes('--electron-connect')) {
require('electron-connect').client.create();
(await import('electron-connect')).client.create();
}
const serverManagerView = new ServerManagerView();

2
typings.d.ts vendored
View File

@@ -14,6 +14,8 @@ declare module '@electron-elements/send-feedback' {
export = SendFeedback;
}
declare module 'electron-connect';
declare module 'node-mac-notifier';
declare module '@yaireo/tagify';