swc
swc copied to clipboard
fix(es/module): support resolving exports from package.json
This adds support in swc_ecma_resolver::node::NodeModulesResolver
to resolve import paths from the exports
field in package.json
. This is needed to resolve the correct file path for packages that use exports
.
By default it uses the export conditions based on the TargetEnv
. It also adds a new constructor NodeModulesResolver::with_export_conditions
that allows adding additional conditions.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.