From 2c0cb2f62be94b05124e9cafee2c46ed0bf57a7e Mon Sep 17 00:00:00 2001 From: Anton Bracke Date: Fri, 18 Feb 2022 23:49:36 +0100 Subject: [PATCH] fix preload script paths --- desktop/src/window.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop/src/window.ts b/desktop/src/window.ts index fe86c6fa..607562ec 100644 --- a/desktop/src/window.ts +++ b/desktop/src/window.ts @@ -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,8 +87,8 @@ export function createWindow() { mainWindow.once("ready-to-show", () => { (async () => { await appView?.webContents.loadURL("https://workadventu.re/"); // TODO: use some splashscreen ? - // appView.webContents.openDevTools({ - // mode: "detach", + // appView?.webContents.openDevTools({ + // mode: "detach", // }); mainWindow?.show(); // mainWindow?.webContents.openDevTools({ mode: "detach" });