swc icon indicating copy to clipboard operation
swc copied to clipboard

fix(es/module): support resolving exports from package.json

Open eandre opened this issue 7 months ago • 2 comments

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.

eandre avatar Nov 12 '23 12:11 eandre

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 12 '23 12:11 CLAassistant

CLA assistant check
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.

CLAassistant avatar Nov 12 '23 12:11 CLAassistant