Skip to content

Commit

Permalink
fix: add only paths option to native require.resolve
Browse files Browse the repository at this point in the history
fixes issue with yarn pnp - related to #204
  • Loading branch information
pi0 committed Sep 25, 2024
1 parent a53715a commit 50e4280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function jitiResolve(

// Try native require resolve with additional extensions and /index as fallback
try {
return ctx.nativeRequire.resolve(id, options);
return ctx.nativeRequire.resolve(id, { paths: options.paths });
} catch (error) {
lastError = error;
}
Expand Down

0 comments on commit 50e4280

Please sign in to comment.