From f8360396ffabd2f95e9ece9c5755173bae0114b6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 3 Jan 2022 17:13:11 +0100 Subject: Stop using tsconfig register Prefer to replace paths at compile time --- server/lib/client-html.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/lib') diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts index e7e439bfe..74788af52 100644 --- a/server/lib/client-html.ts +++ b/server/lib/client-html.ts @@ -3,6 +3,7 @@ import { readFile } from 'fs-extra' import { join } from 'path' import validator from 'validator' import { toCompleteUUID } from '@server/helpers/custom-validators/misc' +import { root } from '@shared/core-utils' import { escapeHTML } from '@shared/core-utils/renderer' import { sha256 } from '@shared/extra-utils' import { HTMLServerConfig } from '@shared/models' @@ -344,11 +345,11 @@ class ClientHtml { { cookie: req.cookies?.clientLanguage, paramLang, acceptLanguage: req.headers['accept-language'] } ) - return join(__dirname, '../../../client/dist/' + buildFileLocale(lang) + '/index.html') + return join(root(), 'client', 'dist', buildFileLocale(lang), 'index.html') } private static getEmbedPath () { - return join(__dirname, '../../../client/dist/standalone/videos/embed.html') + return join(root(), 'client', 'dist', 'standalone', 'videos', 'embed.html') } private static addManifestContentHash (htmlStringPage: string) { -- cgit v1.2.3