feat: enable the ESM for main (#3588)

This commit is contained in:
JellyBrick
2025-07-10 13:43:13 +09:00
committed by GitHub
parent 51a87566e5
commit 6fdac6facf
5 changed files with 14 additions and 24 deletions

View File

@ -74,9 +74,6 @@ unhandled({
showDialog: false,
});
// Disable Node options if the env var is set
process.env.NODE_OPTIONS = '';
// Prevent window being garbage collected
let mainWindow: Electron.BrowserWindow | null;
autoUpdater.autoDownload = false;
@ -361,7 +358,7 @@ async function createMainWindow() {
show: false,
webPreferences: {
contextIsolation: true,
preload: path.join(__dirname, '..', 'preload', 'preload.js'),
preload: path.join(__dirname, '..', 'preload', 'preload.cjs'),
...(isTesting()
? undefined
: {