diff options
author | Chocobozzz <me@florianbigard.com> | 2022-01-03 17:13:11 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-01-06 08:26:14 +0100 |
commit | f8360396ffabd2f95e9ece9c5755173bae0114b6 (patch) | |
tree | 83467f70bb5d5c2faa61c45e1d87b538c6c8fe5e /server/lib | |
parent | cea093bca5b9d311b5c1d0539d53e965c901015b (diff) | |
download | PeerTube-f8360396ffabd2f95e9ece9c5755173bae0114b6.tar.gz PeerTube-f8360396ffabd2f95e9ece9c5755173bae0114b6.tar.zst PeerTube-f8360396ffabd2f95e9ece9c5755173bae0114b6.zip |
Stop using tsconfig register
Prefer to replace paths at compile time
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/client-html.ts | 5 |
1 files changed, 3 insertions, 2 deletions
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' | |||
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import validator from 'validator' | 4 | import validator from 'validator' |
5 | import { toCompleteUUID } from '@server/helpers/custom-validators/misc' | 5 | import { toCompleteUUID } from '@server/helpers/custom-validators/misc' |
6 | import { root } from '@shared/core-utils' | ||
6 | import { escapeHTML } from '@shared/core-utils/renderer' | 7 | import { escapeHTML } from '@shared/core-utils/renderer' |
7 | import { sha256 } from '@shared/extra-utils' | 8 | import { sha256 } from '@shared/extra-utils' |
8 | import { HTMLServerConfig } from '@shared/models' | 9 | import { HTMLServerConfig } from '@shared/models' |
@@ -344,11 +345,11 @@ class ClientHtml { | |||
344 | { cookie: req.cookies?.clientLanguage, paramLang, acceptLanguage: req.headers['accept-language'] } | 345 | { cookie: req.cookies?.clientLanguage, paramLang, acceptLanguage: req.headers['accept-language'] } |
345 | ) | 346 | ) |
346 | 347 | ||
347 | return join(__dirname, '../../../client/dist/' + buildFileLocale(lang) + '/index.html') | 348 | return join(root(), 'client', 'dist', buildFileLocale(lang), 'index.html') |
348 | } | 349 | } |
349 | 350 | ||
350 | private static getEmbedPath () { | 351 | private static getEmbedPath () { |
351 | return join(__dirname, '../../../client/dist/standalone/videos/embed.html') | 352 | return join(root(), 'client', 'dist', 'standalone', 'videos', 'embed.html') |
352 | } | 353 | } |
353 | 354 | ||
354 | private static addManifestContentHash (htmlStringPage: string) { | 355 | private static addManifestContentHash (htmlStringPage: string) { |