aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-01-03 17:13:11 +0100
committerChocobozzz <me@florianbigard.com>2022-01-06 08:26:14 +0100
commitf8360396ffabd2f95e9ece9c5755173bae0114b6 (patch)
tree83467f70bb5d5c2faa61c45e1d87b538c6c8fe5e /server/lib
parentcea093bca5b9d311b5c1d0539d53e965c901015b (diff)
downloadPeerTube-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.ts5
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'
3import { join } from 'path' 3import { join } from 'path'
4import validator from 'validator' 4import validator from 'validator'
5import { toCompleteUUID } from '@server/helpers/custom-validators/misc' 5import { toCompleteUUID } from '@server/helpers/custom-validators/misc'
6import { root } from '@shared/core-utils'
6import { escapeHTML } from '@shared/core-utils/renderer' 7import { escapeHTML } from '@shared/core-utils/renderer'
7import { sha256 } from '@shared/extra-utils' 8import { sha256 } from '@shared/extra-utils'
8import { HTMLServerConfig } from '@shared/models' 9import { 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) {