|
@@ -1,9 +1,5 @@
|
|
|
-import { app, BrowserWindow, Menu, ipcMain } from 'electron';
|
|
|
-import { fileURLToPath } from 'node:url';
|
|
|
-import path, { dirname } from 'node:path';
|
|
|
-
|
|
|
-const __filename = fileURLToPath(import.meta.url);
|
|
|
-const __dirname = dirname(__filename);
|
|
|
+const { app, BrowserWindow, Menu, ipcMain } = require('electron');
|
|
|
+const path = require('path');
|
|
|
|
|
|
function createWindow() {
|
|
|
Menu.setApplicationMenu(null);
|
|
@@ -15,6 +11,7 @@ function createWindow() {
|
|
|
webPreferences: {
|
|
|
preload: path.resolve(__dirname, './preload.js')
|
|
|
},
|
|
|
+ icon: path.resolve(__dirname, './icons/icon.ico')
|
|
|
});
|
|
|
win.loadURL(process.env.VITE_DEV_SERVER_URL || path.resolve(__dirname, '../dist/index.html'));
|
|
|
|