electron-simple/main-common.js

18 lines
398 B
JavaScript
Raw Permalink Normal View History

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