blob: e8db369e331b037d3941051954a364d3d9986f66 (
plain) (
tree)
|
|
import { resolve } from 'path'
const tsConfigPaths = require('tsconfig-paths')
const tsConfig = require('../../tsconfig.json')
function registerTSPaths () {
// 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
})
}
export {
registerTSPaths
}
|