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(resolve): stop searching when module is resolved #135

Merged
merged 2 commits into from Jan 9, 2023
Merged

Conversation

mrm007
Copy link
Contributor

@mrm007 mrm007 commented Jan 7, 2023

This prevents resolve and functions relying on it (like resolveModuleExportNames) from crashing with

Error: ENOTDIR: not a directory, open '/___/mlly/test/fixture/package/exports.mjs/package.json'

This happens when trying to resolve the exports of react-router-dom/server. I've added a fixture that is a stripped down version of react-router-dom@6.4.3.
You can see the error when running the test without the fix.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pi0 pi0 merged commit f10e797 into unjs:main Jan 9, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants