aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-10-21 16:02:15 +0200
committerChocobozzz <me@florianbigard.com>2019-10-21 16:02:15 +0200
commit464687bb96cf98d00714279750fd5f19a42b6a02 (patch)
tree16a3d538a99c46ed6885a119bfd8109167b61134 /server.ts
parentd5d9b6d7bfb7e9426b6462f7fdf285df39eea820 (diff)
downloadPeerTube-464687bb96cf98d00714279750fd5f19a42b6a02.tar.gz
PeerTube-464687bb96cf98d00714279750fd5f19a42b6a02.tar.zst
PeerTube-464687bb96cf98d00714279750fd5f19a42b6a02.zip
Fix bug with tsconfig paths
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts15
1 files changed, 11 insertions, 4 deletions
diff --git a/server.ts b/server.ts
index 5cfa09445..b49d10344 100644
--- a/server.ts
+++ b/server.ts
@@ -1,12 +1,18 @@
1require('module-alias/register') 1import { resolve } from 'path'
2 2
3// FIXME: https://github.com/nodejs/node/pull/16853 3const tsConfig = require('./tsconfig.json')
4import { PluginManager } from './server/lib/plugins/plugin-manager' 4const tsConfigPaths = require('tsconfig-paths')
5
6// Thanks: https://github.com/dividab/tsconfig-paths/issues/75#issuecomment-458936883
7tsConfigPaths.register({
8 baseUrl: resolve(tsConfig.compilerOptions.baseUrl || '', tsConfig.compilerOptions.outDir || ''),
9 paths: tsConfig.compilerOptions.paths
10})
5 11
12// FIXME: https://github.com/nodejs/node/pull/16853
6require('tls').DEFAULT_ECDH_CURVE = 'auto' 13require('tls').DEFAULT_ECDH_CURVE = 'auto'
7 14
8import { isTestInstance } from './server/helpers/core-utils' 15import { isTestInstance } from './server/helpers/core-utils'
9
10if (isTestInstance()) { 16if (isTestInstance()) {
11 require('source-map-support').install() 17 require('source-map-support').install()
12} 18}
@@ -121,6 +127,7 @@ import { PeerTubeSocket } from './server/lib/peertube-socket'
121import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls' 127import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls'
122import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler' 128import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler'
123import { Hooks } from './server/lib/plugins/hooks' 129import { Hooks } from './server/lib/plugins/hooks'
130import { PluginManager } from './server/lib/plugins/plugin-manager'
124 131
125// ----------- Command line ----------- 132// ----------- Command line -----------
126 133