Skip to content

Commit 52a6f25

Browse files
committed
fix(share): template directory in production
1 parent ba26c47 commit 52a6f25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/server/src/share/content_renderer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type BBranch from "../becca/entities/bbranch.js";
99
import { t } from "i18next";
1010
import SBranch from "./shaca/entities/sbranch.js";
1111
import options from "../services/options.js";
12-
import utils, { isDev, safeExtractMessageAndStackFromError } from "../services/utils.js";
12+
import utils, { getResourceDir, isDev, safeExtractMessageAndStackFromError } from "../services/utils.js";
1313
import ejs from "ejs";
1414
import log from "../services/log.js";
1515
import { join } from "path";
@@ -199,7 +199,7 @@ function getDefaultTemplatePath(template: string) {
199199
// Path is relative to apps/server/dist/assets/views
200200
return process.env.NODE_ENV === "development"
201201
? join(__dirname, `../../../../packages/share-theme/src/templates/${template}.ejs`)
202-
: `../../share-theme/templates/${template}.ejs`;
202+
: join(getResourceDir(), `share-theme/templates/${template}.ejs`);
203203
}
204204

205205
function readTemplate(path: string) {

0 commit comments

Comments
 (0)