prezentacja-tutorial/index.js
2024-11-05 18:14:48 +01:00

17 lines
434 B
JavaScript
Executable File

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');
});