import path from 'path' ; export const readTsConfig = ( root ) => { const typescript = require ( 'typescript' ) ; return typescript . readConfigFile ( path . resolve ( root , './tsconfig.json' ) , typescript . sys . readFile ) . config ; } ; export const readTsConfigByFile = ( filename ) => { const typescript = require ( 'typescript' ) ; return typescript . readConfigFile ( path . resolve ( filename ) , typescript . sys . readFile ) . config ; } ;