server-esm: Fix a few more straightforward imports

This commit is contained in:
Elian Doran
2024-07-18 23:48:14 +03:00
parent 508b5e3c69
commit 93a0782009
4 changed files with 18 additions and 4 deletions

View File

@@ -132,7 +132,7 @@ function getIcon() {
}
async function createSetupWindow() {
const { BrowserWindow } = require('electron'); // should not be statically imported
const { BrowserWindow } = await import("electron"); // should not be statically imported
setupWindow = new BrowserWindow({
width: 800,
height: 800,
@@ -156,7 +156,7 @@ function closeSetupWindow() {
}
async function registerGlobalShortcuts() {
const { globalShortcut } = require('electron');
const { globalShortcut } = await import("electron");
await sqlInit.dbReady;