mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-10-03 19:44:07 +08:00
fix(monorepo/desktop): remote not working
This commit is contained in:
parent
e8095e8056
commit
7935b250d0
@ -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")
|
||||
}
|
||||
]
|
||||
})
|
||||
|
@ -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;
|
||||
|
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user