diff options
author | Chocobozzz <me@florianbigard.com> | 2019-10-21 16:02:15 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-10-21 16:02:15 +0200 |
commit | 464687bb96cf98d00714279750fd5f19a42b6a02 (patch) | |
tree | 16a3d538a99c46ed6885a119bfd8109167b61134 /server.ts | |
parent | d5d9b6d7bfb7e9426b6462f7fdf285df39eea820 (diff) | |
download | PeerTube-464687bb96cf98d00714279750fd5f19a42b6a02.tar.gz PeerTube-464687bb96cf98d00714279750fd5f19a42b6a02.tar.zst PeerTube-464687bb96cf98d00714279750fd5f19a42b6a02.zip |
Fix bug with tsconfig paths
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1,12 +1,18 @@ | |||
1 | require('module-alias/register') | 1 | import { resolve } from 'path' |
2 | 2 | ||
3 | // FIXME: https://github.com/nodejs/node/pull/16853 | 3 | const tsConfig = require('./tsconfig.json') |
4 | import { PluginManager } from './server/lib/plugins/plugin-manager' | 4 | const tsConfigPaths = require('tsconfig-paths') |
5 | |||
6 | // Thanks: https://github.com/dividab/tsconfig-paths/issues/75#issuecomment-458936883 | ||
7 | tsConfigPaths.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 | ||
6 | require('tls').DEFAULT_ECDH_CURVE = 'auto' | 13 | require('tls').DEFAULT_ECDH_CURVE = 'auto' |
7 | 14 | ||
8 | import { isTestInstance } from './server/helpers/core-utils' | 15 | import { isTestInstance } from './server/helpers/core-utils' |
9 | |||
10 | if (isTestInstance()) { | 16 | if (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' | |||
121 | import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls' | 127 | import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls' |
122 | import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler' | 128 | import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler' |
123 | import { Hooks } from './server/lib/plugins/hooks' | 129 | import { Hooks } from './server/lib/plugins/hooks' |
130 | import { PluginManager } from './server/lib/plugins/plugin-manager' | ||
124 | 131 | ||
125 | // ----------- Command line ----------- | 132 | // ----------- Command line ----------- |
126 | 133 | ||