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

Resolution from directories specified via nodePaths ignore package.json exports entries #2752

Closed
clydin opened this issue Dec 15, 2022 · 0 comments

Comments

@clydin
Copy link

clydin commented Dec 15, 2022

Currently it is not possible to correctly resolve packages that use the exports field and are located in a directory specified by the nodePaths option. Entries within the exports field appear to be ignored in this case but main fields present will be resolved. This can result in either a resolution failure due to no main fields being present or an incorrect resolution due to a main field being used instead of an exports entry based on the active conditions.

Would it be possible to change the nodePaths resolution from using only loadAsFileOrDirectory to the full node_modules resolution process? This should allow full resolution of packages in alternative node modules directories.

@evanw evanw closed this as completed in 14cc802 Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant