Skip to content

Commit 2f72c82

Browse files
committed
refactor: wip
1 parent ec537fe commit 2f72c82

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

packages/utils/src/lib/import-module.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { stat } from 'node:fs/promises';
33
import path from 'node:path';
44
import { pathToFileURL } from 'node:url';
55
import type { CompilerOptions } from 'typescript';
6-
import { fileExists } from './file-system.js';
76
import { loadTargetConfig } from './load-ts-config.js';
87
import { settlePromise } from './promises.js';
98

@@ -178,19 +177,8 @@ export async function createTsJiti(
178177
createJiti: (typeof import('jiti'))['createJiti'] = createJitiSource,
179178
) {
180179
const { tsconfigPath, ...jitiOptions } = options;
181-
const fallbackTsconfigPath = path.resolve(process.cwd(), 'tsconfig.json');
182-
const fallbackBaseTsconfigPath = path.resolve(
183-
process.cwd(),
184-
'tsconfig.base.json',
185-
);
186180
const validPath: null | string =
187-
tsconfigPath == null
188-
? (await fileExists(fallbackTsconfigPath))
189-
? fallbackTsconfigPath
190-
: (await fileExists(fallbackBaseTsconfigPath))
191-
? fallbackBaseTsconfigPath
192-
: null
193-
: path.resolve(process.cwd(), tsconfigPath);
181+
tsconfigPath != null ? path.resolve(process.cwd(), tsconfigPath) : null;
194182
const tsDerivedJitiOptions: MappableJitiOptions = validPath
195183
? await jitiOptionsFromTsConfig(validPath)
196184
: {};

0 commit comments

Comments
 (0)