fix preload script paths
This commit is contained in:
parent
313366d5b1
commit
2c0cb2f62b
@ -36,7 +36,7 @@ export function createWindow() {
|
|||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
show: false,
|
show: false,
|
||||||
webPreferences: {
|
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({
|
appView = new BrowserView({
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: path.join(__dirname, "../dist/app/index.js"),
|
preload: path.resolve(__dirname, "..", "build", "app", "preload.js"),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
mainWindow.setBrowserView(appView);
|
mainWindow.setBrowserView(appView);
|
||||||
@ -87,8 +87,8 @@ export function createWindow() {
|
|||||||
mainWindow.once("ready-to-show", () => {
|
mainWindow.once("ready-to-show", () => {
|
||||||
(async () => {
|
(async () => {
|
||||||
await appView?.webContents.loadURL("https://workadventu.re/"); // TODO: use some splashscreen ?
|
await appView?.webContents.loadURL("https://workadventu.re/"); // TODO: use some splashscreen ?
|
||||||
// appView.webContents.openDevTools({
|
// appView?.webContents.openDevTools({
|
||||||
// mode: "detach",
|
// mode: "detach",
|
||||||
// });
|
// });
|
||||||
mainWindow?.show();
|
mainWindow?.show();
|
||||||
// mainWindow?.webContents.openDevTools({ mode: "detach" });
|
// mainWindow?.webContents.openDevTools({ mode: "detach" });
|
||||||
|
Loading…
Reference in New Issue
Block a user