Skip to content

Commit 38be0c0

Browse files
fix: include mapper with no files and force non-dynamic projects to use absolute paths
1 parent 7fdfd80 commit 38be0c0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/index.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,9 @@ function initMappers(options: InternalResolverOptions) {
430430
// Turn glob patterns into paths
431431
const projectPaths = [
432432
...new Set([
433-
...configPaths.filter(path => !isDynamicPattern(path)),
433+
...configPaths
434+
.filter(p => !isDynamicPattern(p))
435+
.map(p => path.resolve(process.cwd(), p)),
434436
...globSync(
435437
configPaths.filter(path => isDynamicPattern(path)),
436438
{
@@ -504,11 +506,6 @@ function initMappers(options: InternalResolverOptions) {
504506
: []),
505507
]
506508

507-
if (files.length === 0) {
508-
// eslint-disable-next-line unicorn/no-useless-undefined
509-
return undefined
510-
}
511-
512509
return {
513510
path: toNativePathSeparator(tsconfigResult.path),
514511
files: new Set(files.map(toNativePathSeparator)),

0 commit comments

Comments
 (0)