const {app, BrowserWindow} = require('electron'); const path = require('path'); function createWindow() { const win = new BrowserWindow({ width: 1100, height: 790, resizable: false, frame: false, transparent: true, autoHideMenuBar: true, webPreferences: { preload: path.join(__dirname, 'preload.js'), nodeIntegration: true, contextIsolation: false, } }); win.loadURL('http://localhost:8080'); //win.loadFile(path.join(__dirname, 'dist/index.html')); } app.whenReady().then(createWindow); app.on('window-all-closed', () => { if (process.platform !== 'darwin') { app.quit(); } }); app.on('activate', () => { if (BrowserWindow.getAllWindows().length === 0) { createWindow(); } });