-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[Native ES Modules] Support for exports subpath aliasing #9565
Comments
Thanks, I'd forgotten to add it 👍 Updated the post now with this:
This would have been fine as a comment in that issue, btw 🙂 I'll close this as I've added the tracking item over there |
Thanks @SimenB ! I opened a new issue because of
I see now that that sentence can be read in two different ways, and I read it the wrong way ("comments to tell me I'm missing something will be marked as spam"). Hopefully you're not missing anything else, but if I think of anything, I'll leave a comment next time. 😄 |
Fair enough! I rephrased it now so hopefully we're down to only a single interpretation 👍 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
@SimenB Great to see the list in #9430 and progress being made on it. Lots of complicated issues.
I don't see an explicit mention of handling
exports
object from a package when resolving package identifiers.For example, given this in package.json:
Assuming the ESM package has a file located at
/lib/foo.js
, you would instead import from"package-name/foo.js"
and then Node transforms that to add/lib
layer.Currently latest Jest (using Babel for parsing) does not respect this
exports
mapping so we have to add a matching Jest config for every dependency package that uses it:Will this "just work" when native ESM support lands? If so, great, you can close this.
If not I think it should be added to your list. Thanks!
Ref: https://nodejs.org/dist/latest-v12.x/docs/api/esm.html#esm_package_exports
The text was updated successfully, but these errors were encountered: