You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
602 B
JavaScript
20 lines
602 B
JavaScript
import { app as e, BrowserWindow as r } from "electron";
|
|
import { fileURLToPath as t } from "url";
|
|
import o from "path";
|
|
const a = t(import.meta.url), i = o.dirname(a);
|
|
e.whenReady().then(() => {
|
|
const n = new r({
|
|
width: 800,
|
|
height: 600,
|
|
webPreferences: {
|
|
nodeIntegration: !1,
|
|
contextIsolation: !0,
|
|
preload: o.join(i, "../preload/index.js")
|
|
}
|
|
});
|
|
process.env.VITE_DEV_SERVER_URL ? n.loadURL(process.env.VITE_DEV_SERVER_URL) : n.loadFile(o.join(i, "../../dist/index.html"));
|
|
});
|
|
e.on("window-all-closed", () => {
|
|
process.platform !== "darwin" && e.quit();
|
|
});
|