Skip to content

Commit 50e4280

Browse files
committedSep 25, 2024·
fix: add only paths option to native require.resolve
fixes issue with yarn pnp - related to #204
1 parent a53715a commit 50e4280

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/resolve.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function jitiResolve(
5252

5353
// Try native require resolve with additional extensions and /index as fallback
5454
try {
55-
return ctx.nativeRequire.resolve(id, options);
55+
return ctx.nativeRequire.resolve(id, { paths: options.paths });
5656
} catch (error) {
5757
lastError = error;
5858
}

0 commit comments

Comments
 (0)
Please sign in to comment.