I want to specify just cwd and have the tool infer the baseUrl read the paths from the tsconfig in my specified cwd.
However, register does not permit that
export interface ExplicitParams {
baseUrl: string;
paths: { [key: string]: Array<string> };
mainFields?: (string | string[])[];
addMatchAll?: boolean;
cwd?: string;
}
It'd be nice if I could just specify cwd
For context, I'm using ts-node and tsconfig-paths in a script like the following
const { register } = require('ts-node');
const tsConfigPaths = require('tsconfig-paths');
const cwd = '/path/to/tsconfig/';
// this works
register({ cwd });
// this does not work, need to specify baseUrl and paths
tsConfigPaths.register( { cwd } );
I want to specify just
cwdand have the tool infer the baseUrl read the paths from the tsconfig in my specified cwd.However, register does not permit that
It'd be nice if I could just specify
cwdFor context, I'm using ts-node and tsconfig-paths in a script like the following