File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,17 @@ export async function importModule<T = unknown>(
1818) : Promise < T > {
1919 const { filepath, tsconfig, ...jitiOptions } = options ;
2020
21- const resolvedStats = await settlePromise ( stat ( options . filepath ) ) ;
21+ const resolvedStats = await settlePromise ( stat ( filepath ) ) ;
2222 if ( resolvedStats . status === 'rejected' ) {
23- throw new Error ( `File '${ options . filepath } ' does not exist` ) ;
23+ throw new Error ( `File '${ filepath } ' does not exist` ) ;
2424 }
2525 if ( ! resolvedStats . value . isFile ( ) ) {
26- throw new Error ( `Expected '${ options . filepath } ' to be a file` ) ;
26+ throw new Error ( `Expected '${ filepath } ' to be a file` ) ;
2727 }
2828
29- const jitiInstance = await createTsJiti ( options . filepath , {
29+ const jitiInstance = await createTsJiti ( process . cwd ( ) , {
3030 ...jitiOptions ,
31- tsconfigPath : options . tsconfig ,
31+ tsconfigPath : tsconfig ,
3232 } ) ;
3333 return ( await jitiInstance . import ( filepath , { default : true } ) ) as T ;
3434}
You can’t perform that action at this time.
0 commit comments