-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Case Study] Exports Support #650
Comments
If nodejs/node#32869 lands, this likely should include support for |
This one is hard to fit in the current PnP setup. Resolution is split into two parts:
and neither is (at the moment) a good fit for package exports. Why isn't `resolveToUnqualified` a good place for package export resolution?Two big reasons:
Why isn't `resolveUnqualified` a good place for package export resolution?This is best shown using an example. Suppose we've got a package with manifest {
"name": "exported",
"main": "./index.js",
"exports": {
"default": "./index.js",
"./deep": "./lib/deep.js"
}
} The package contains three javascript files:
If we implement package export resolution in
I currently see three options:
I'm inclined not to use the first option, it doesn't quite fit the description of that function. |
Describe the bug
See:
Node ^12.7.0 with the
--experimental-modules
flag and Node ^13.0.0 without the flag resolves modules differently than Yarn@2.0.0-rc19 with PNPTo Reproduce
See this project:
https://github.com/sparebytes/yarn2-pnp-exports-example
Environment
The text was updated successfully, but these errors were encountered: