X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server.ts;h=b49d10344bb5a38b83739afe30fe7b350a85322d;hb=2be68ab979b23c29177ac0e3e8c4677e5401f1ee;hp=5cfa09445537215fd3f9c772955d45a02ddd1b9a;hpb=00aab0666c6f772548c160fdfa871a8843b88f37;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server.ts b/server.ts index 5cfa09445..b49d10344 100644 --- a/server.ts +++ b/server.ts @@ -1,12 +1,18 @@ -require('module-alias/register') +import { resolve } from 'path' -// FIXME: https://github.com/nodejs/node/pull/16853 -import { PluginManager } from './server/lib/plugins/plugin-manager' +const tsConfig = require('./tsconfig.json') +const tsConfigPaths = require('tsconfig-paths') + +// Thanks: https://github.com/dividab/tsconfig-paths/issues/75#issuecomment-458936883 +tsConfigPaths.register({ + baseUrl: resolve(tsConfig.compilerOptions.baseUrl || '', tsConfig.compilerOptions.outDir || ''), + paths: tsConfig.compilerOptions.paths +}) +// FIXME: https://github.com/nodejs/node/pull/16853 require('tls').DEFAULT_ECDH_CURVE = 'auto' import { isTestInstance } from './server/helpers/core-utils' - if (isTestInstance()) { require('source-map-support').install() } @@ -121,6 +127,7 @@ import { PeerTubeSocket } from './server/lib/peertube-socket' import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls' import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler' import { Hooks } from './server/lib/plugins/hooks' +import { PluginManager } from './server/lib/plugins/plugin-manager' // ----------- Command line -----------