Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix/New] Node resolver: Try to use require.resolve when suitable #2957

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

akx
Copy link

@akx akx commented Jan 22, 2024

This PR proposes to have the Node resolver use require.resolve when possible; among other things, this enables support for packages that only have exports.main (when the underlying Node.js version supports them) (see #2132).

I don't know if there are subtleties to this, but I feel like this could work.

@akx akx force-pushed the node-require-resolve branch from d440083 to d03e353 Compare April 11, 2024 15:11
@akx
Copy link
Author

akx commented Apr 11, 2024

Rebased to fix conflicts from 2d38b33.

@akx akx force-pushed the node-require-resolve branch from d03e353 to df18ba7 Compare April 11, 2024 15:25
@akx akx force-pushed the node-require-resolve branch from df18ba7 to 1592741 Compare June 24, 2024 11:53
@ljharb
Copy link
Member

ljharb commented Aug 29, 2024

I think there's a lot of subtleties here, and we'd need lots of tests to cover this behavior.

@ljharb ljharb marked this pull request as draft August 29, 2024 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants