fix preload script paths

This commit is contained in:
Anton Bracke 2022-02-18 23:49:36 +01:00
parent 313366d5b1
commit 2c0cb2f62b
No known key found for this signature in database
GPG Key ID: B1222603899C6B25

View File

@ -36,7 +36,7 @@ export function createWindow() {
autoHideMenuBar: true,
show: false,
webPreferences: {
preload: path.join(__dirname, "../dist/sidebar/preload.js"),
preload: path.resolve(__dirname, "..", "build", "sidebar", "preload.js"),
},
});
@ -69,7 +69,7 @@ export function createWindow() {
appView = new BrowserView({
webPreferences: {
preload: path.join(__dirname, "../dist/app/index.js"),
preload: path.resolve(__dirname, "..", "build", "app", "preload.js"),
},
});
mainWindow.setBrowserView(appView);
@ -87,7 +87,7 @@ export function createWindow() {
mainWindow.once("ready-to-show", () => {
(async () => {
await appView?.webContents.loadURL("https://workadventu.re/"); // TODO: use some splashscreen ?
// appView.webContents.openDevTools({
// appView?.webContents.openDevTools({
// mode: "detach",
// });
mainWindow?.show();