project-client/src/main/mainWindow.ts

20 lines
453 B
TypeScript
Raw Normal View History

2023-03-30 08:02:30 +09:00
import { BrowserWindow } from "electron";
import { join } from "path";
export function createMainWindow() {
const win = new BrowserWindow({
show: false,
webPreferences: {
nodeIntegration: false,
sandbox: false,
2023-03-30 08:02:30 +09:00
contextIsolation: true,
devTools: true,
preload: join(__dirname, "preload.js")
}
});
win.loadURL("https://discord.com/app");
return win;
}