Skip to content

Build your personal knowledge base with Trilium Notes

Merge branch 'feature/server_esm_part2' into feature/server_esm_part3

Elian Doran1b5b3e697efa
diff --cc src/services/resource_dir.ts
index d93d1ea358,7e194dc67f..923f277cfc
--- a/src/services/resource_dir.ts
+++ b/src/services/resource_dir.ts
@@@ -2,8 -2,7 +2,8 @@@ import log from "./log.js"
import path from "path";
import fs from "fs";
-export const RESOURCE_DIR = path.resolve(__dirname, "../..");
+import { fileURLToPath } from "url";
- const RESOURCE_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
++export const RESOURCE_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
// where the "trilium" executable is
const ELECTRON_APP_ROOT_DIR = path.resolve(RESOURCE_DIR, "../..");