mirror of
https://github.com/zadam/trilium.git
synced 2025-10-28 10:08:52 +01:00
fix(share): template directory in production
Some checks are pending
Checks / main (push) Waiting to run
Some checks are pending
Checks / main (push) Waiting to run
This commit is contained in:
parent
ba26c478d6
commit
52a6f2597e
@ -9,7 +9,7 @@ import type BBranch from "../becca/entities/bbranch.js";
|
||||
import { t } from "i18next";
|
||||
import SBranch from "./shaca/entities/sbranch.js";
|
||||
import options from "../services/options.js";
|
||||
import utils, { isDev, safeExtractMessageAndStackFromError } from "../services/utils.js";
|
||||
import utils, { getResourceDir, isDev, safeExtractMessageAndStackFromError } from "../services/utils.js";
|
||||
import ejs from "ejs";
|
||||
import log from "../services/log.js";
|
||||
import { join } from "path";
|
||||
@ -199,7 +199,7 @@ function getDefaultTemplatePath(template: string) {
|
||||
// Path is relative to apps/server/dist/assets/views
|
||||
return process.env.NODE_ENV === "development"
|
||||
? join(__dirname, `../../../../packages/share-theme/src/templates/${template}.ejs`)
|
||||
: `../../share-theme/templates/${template}.ejs`;
|
||||
: join(getResourceDir(), `share-theme/templates/${template}.ejs`);
|
||||
}
|
||||
|
||||
function readTemplate(path: string) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user