fix(monorepo/desktop): remote not working

This commit is contained in:
Elian Doran 2025-04-24 22:16:59 +03:00
parent e8095e8056
commit 7935b250d0
No known key found for this signature in database
3 changed files with 9 additions and 6 deletions

View File

@ -6,7 +6,7 @@ const outputDir = join(__dirname, 'dist');
module.exports = {
output: {
path: outputDir
path: outputDir,
},
target: [ "node" ],
plugins: [
@ -21,13 +21,12 @@ module.exports = {
generatePackageJson: true,
externalDependencies: [
"electron/main",
"@electron/remote/main",
"electron",
"@electron/remote",
"better-sqlite3"
],
assets: [
]
assets: []
}),
new CopyPlugin({
patterns: [
@ -42,6 +41,10 @@ module.exports = {
{
from: "../server/dist/assets",
to: join(outputDir, "assets")
},
{
from: "node_modules/@electron/remote",
to: join(outputDir, "node_modules/@electron/remote")
}
]
})

View File

@ -134,7 +134,7 @@ export default async function buildApp() {
startScheduledCleanup();
if (utils.isElectron) {
(await import("@electron/remote/main/index.js")).initialize();
(await import("@electron/remote/main")).initialize();
}
return app;

View File

@ -7,7 +7,7 @@ import log from "./log.js";
import sqlInit from "./sql_init.js";
import cls from "./cls.js";
import keyboardActionsService from "./keyboard_actions.js";
import remoteMain from "@electron/remote/main/index.js";
import * as remoteMain from "@electron/remote/main";
import { BrowserWindow, shell, type App, type BrowserWindowConstructorOptions, type WebContents } from "electron";
import { dialog, ipcMain } from "electron";
import { formatDownloadTitle, isDev, isMac, isWindows } from "./utils.js";