File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ export interface EmitFile extends BaseFile {
3535export const getConfigDirectory = ( options : ts . CompilerOptions ) =>
3636 options . configFilePath ? path . dirname ( options . configFilePath ) : process . cwd ( ) ;
3737
38+ const getTstlDirectory = ( ) => path . dirname ( __dirname ) ;
39+
3840export function resolvePlugin (
3941 kind : string ,
4042 optionName : string ,
@@ -59,7 +61,7 @@ export function resolvePlugin(
5961 const hasNoRequireHook = require . extensions [ ".ts" ] === undefined ;
6062 if ( hasNoRequireHook && ( resolved . endsWith ( ".ts" ) || resolved . endsWith ( ".tsx" ) ) ) {
6163 try {
62- const tsNodePath = resolve . sync ( "ts-node" , { basedir } ) ;
64+ const tsNodePath = resolve . sync ( "ts-node" , { basedir : getTstlDirectory ( ) } ) ;
6365 const tsNode : typeof import ( "ts-node" ) = require ( tsNodePath ) ;
6466 tsNode . register ( { transpileOnly : true } ) ;
6567 } catch ( err ) {
You can’t perform that action at this time.
0 commit comments