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

Add Yarn PnP support? #16

Closed
akrawitz opened this issue Mar 3, 2020 · 5 comments
Closed

Add Yarn PnP support? #16

akrawitz opened this issue Mar 3, 2020 · 5 comments

Comments

@akrawitz
Copy link

akrawitz commented Mar 3, 2020

Yarn v2 is moving away from node_modules to use Plug'n'Play instead. If I understand this all correctly, it would be very helpful if this package supported PnP-based resolution in addition to the traditional node_modules approach, since many other packages rely on this package for resolution as an alternative to require.resolve. For reference:
Yarn Plug'n'Play

Thanks for all of your amazing open source work!

@sindresorhus
Copy link
Owner

Sorry, I have no intention of supporting Yarn PnP. It's up to Yarn to support how the ecosystem works, not the other way around. I'd recommend opening an issue on https://github.com/yarnpkg/berry.

@kachkaev
Copy link

kachkaev commented Oct 22, 2020

Facing this problem in vercel/vercel#4910. A solution via upgrading this package would be ideal, but if yarn 2 support is not planned, I guess that the community will need to find a workaround. Does anyone have any examples? Perhaps, there exists a package like resolve-from-as-before-but-also-support-yarn-pnp?

@merceyz
Copy link

merceyz commented Oct 22, 2020

This package already supports PnP, it's using Module._resolveFilename which supports PnP, so there are no changes required here.

@kachkaev
Copy link

@merceyz my knowledge of the topic is quite modest, so what you’re saying may well be true. What are your thoughts on vercel/vercel#4910 (reply in thread)? This is what points the investigation towards this issue.

@merceyz
Copy link

merceyz commented Oct 22, 2020

Lets take that in yarnpkg/berry#2031, no need to bother Sindre with this

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

4 participants