import { app, BrowserWindow } from 'electron'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); app.whenReady().then(() => { const win = new BrowserWindow({ width: 900, height: 700, webPreferences: { preload: path.join(__dirname, 'preload.js'), }, }); win.loadFile('html/index.html'); });