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 = {
|
module.exports = {
|
||||||
output: {
|
output: {
|
||||||
path: outputDir
|
path: outputDir,
|
||||||
},
|
},
|
||||||
target: [ "node" ],
|
target: [ "node" ],
|
||||||
plugins: [
|
plugins: [
|
||||||
@ -21,13 +21,12 @@ module.exports = {
|
|||||||
generatePackageJson: true,
|
generatePackageJson: true,
|
||||||
externalDependencies: [
|
externalDependencies: [
|
||||||
"electron/main",
|
"electron/main",
|
||||||
|
"@electron/remote/main",
|
||||||
"electron",
|
"electron",
|
||||||
"@electron/remote",
|
"@electron/remote",
|
||||||
"better-sqlite3"
|
"better-sqlite3"
|
||||||
],
|
],
|
||||||
assets: [
|
assets: []
|
||||||
|
|
||||||
]
|
|
||||||
}),
|
}),
|
||||||
new CopyPlugin({
|
new CopyPlugin({
|
||||||
patterns: [
|
patterns: [
|
||||||
@ -42,6 +41,10 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
from: "../server/dist/assets",
|
from: "../server/dist/assets",
|
||||||
to: join(outputDir, "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();
|
startScheduledCleanup();
|
||||||
|
|
||||||
if (utils.isElectron) {
|
if (utils.isElectron) {
|
||||||
(await import("@electron/remote/main/index.js")).initialize();
|
(await import("@electron/remote/main")).initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
return app;
|
return app;
|
||||||
|
@ -7,7 +7,7 @@ import log from "./log.js";
|
|||||||
import sqlInit from "./sql_init.js";
|
import sqlInit from "./sql_init.js";
|
||||||
import cls from "./cls.js";
|
import cls from "./cls.js";
|
||||||
import keyboardActionsService from "./keyboard_actions.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 { BrowserWindow, shell, type App, type BrowserWindowConstructorOptions, type WebContents } from "electron";
|
||||||
import { dialog, ipcMain } from "electron";
|
import { dialog, ipcMain } from "electron";
|
||||||
import { formatDownloadTitle, isDev, isMac, isWindows } from "./utils.js";
|
import { formatDownloadTitle, isDev, isMac, isWindows } from "./utils.js";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user