Use typescript paths in cli scripts too

This commit is contained in:
Chocobozzz 2019-10-21 17:13:07 +02:00
parent 576ddf645f
commit 2aaa1a3fdc
No known key found for this signature in database
GPG key ID: 583A612D890159BE
23 changed files with 82 additions and 9 deletions

View file

@ -1,13 +1,6 @@
import { resolve } from 'path'
import { registerTSPaths } from './server/helpers/register-ts-paths'
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
})
registerTSPaths()
// FIXME: https://github.com/nodejs/node/pull/16853
require('tls').DEFAULT_ECDH_CURVE = 'auto'