Improve Electron experience and build system

This commit is contained in:
2025-09-19 22:10:31 +03:00
Unverified
parent 89492b2f8c
commit a580b87e1c
17 changed files with 197 additions and 146 deletions
+4 -4
View File
@@ -4,7 +4,7 @@ import path from "node:path";
app.whenReady().then(() => {
const win = new BrowserWindow({
title: 'Main window',
minWidth: 650,
minWidth: 800,
minHeight: 420,
webPreferences: {
preload: path.join(import.meta.dirname, "preload.mjs")
@@ -16,11 +16,11 @@ app.whenReady().then(() => {
y: 16 - 4
},
titleBarOverlay: process.platform !== "darwin"
})
});
if (process.env.VITE_DEV_SERVER_URL) {
win.loadURL(process.env.VITE_DEV_SERVER_URL)
win.loadURL(process.env.VITE_DEV_SERVER_URL);
} else {
win.loadFile('dist/index.html');
win.loadFile('frontend/build/electron/dist/index.html');
}
});