Skip to content

Build your personal knowledge base with Trilium Notes

chore(monorepo/electron): rewrite server imports

Elian Doran00ca0e6e32e5
diff --git a/_regroup/package.json b/_regroup/package.json
index 4cf22f3a47..a840606d15 100644
--- a/_regroup/package.json
+++ b/_regroup/package.json
@@ -62,7 +62,6 @@
"@electron/rebuild": "3.7.2",
"@playwright/test": "1.51.1",
"@stylistic/eslint-plugin": "4.2.0",
- "@types/electron-squirrel-startup": "1.0.2",
"@types/express": "5.0.1",
"@types/node": "22.14.1",
"@types/yargs": "17.0.33",
diff --git a/apps/electron/src/electron-main.ts b/apps/electron/src/electron-main.ts
index 424209012e..d6d1f1f149 100644
--- a/apps/electron/src/electron-main.ts
+++ b/apps/electron/src/electron-main.ts
@@ -1,4 +1,4 @@
-import { initializeTranslations } from "./src/services/i18n.js";
+import { initializeTranslations } from "@triliumnext/server/src/services/i18n.js";
await initializeTranslations();
await import("./electron.js");
diff --git a/apps/electron/src/electron.ts b/apps/electron/src/electron.ts
index 00a96bdb06..d866d08473 100644
--- a/apps/electron/src/electron.ts
+++ b/apps/electron/src/electron.ts
@@ -3,10 +3,10 @@
import electron from "electron";
import electronDebug from "electron-debug";
import electronDl from "electron-dl";
-import sqlInit from "./src/services/sql_init.js";
-import windowService from "./src/services/window.js";
-import tray from "./src/services/tray.js";
-import options from "./src/services/options.js";
+import sqlInit from "@triliumnext/server/src/services/sql_init.js";
+import windowService from "@triliumnext/server/src/services/window.js";
+import tray from "@triliumnext/server/src/services/tray.js";
+import options from "@triliumnext/server/src/services/options.js";
// Prevent Trilium starting twice on first install and on uninstall for the Windows installer.
if ((await import("electron-squirrel-startup")).default) {
@@ -64,4 +64,4 @@ electron.app.on("will-quit", () => {
// this is to disable electron warning spam in the dev console (local development only)
process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = "true";
-await import("./src/main.js");
+await import("@triliumnext/server/src/main.js");