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

Ignore Default condition should be last one #421

Open
scagood opened this issue May 12, 2024 · 2 comments
Open

Ignore Default condition should be last one #421

scagood opened this issue May 12, 2024 · 2 comments

Comments

@scagood
Copy link

scagood commented May 12, 2024

I am looking for a way to more closely mimic the nodejs resolution as in both eslint-community/eslint-plugin-n#182 and eslint-community/eslint-plugin-n#242 we have packages that don't correctly implement the exports order. However, they do resolve correctly when called in either import or require.

When debugging this initially I discoved the error was throw here: https://github.com/webpack/enhanced-resolve/blob/main/lib/util/entrypoints.js#L474-L476

What I am hoping for is that we can (via a passed in option) disable the throw?


I am very willing to submit code if that would help!

@alexander-akait
Copy link
Member

I am looking for a way to more closely mimic the nodejs resolution as in both eslint-community/eslint-plugin-n#182 and eslint-community/eslint-plugin-n#242 we have packages that don't correctly implement the exports order. However, they do resolve correctly when called in either import or require.

Can you provide an example, I want to investigate, thank you

@scagood
Copy link
Author

scagood commented May 22, 2024

I sure can! I have tossed together a quick example :)

https://github.com/scagood/enhanced-resolve-repro

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

2 participants