electron-simple/main-module.js
2022-10-02 22:09:56 -07:00

18 lines
387 B
JavaScript

import { app, BrowserWindow } from 'electron';
import { join } from 'path';
(async () => {
await app.whenReady();
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
sandbox: false,
preload: join(__dirname, 'preload-module.js'),
},
});
mainWindow.loadFile('./view/index.html')
})()