Skip to content

BUG: if providing main field instead of exports findFirstExistingMainFieldMappedFile fails silently #282

@shairez

Description

@shairez

if pointing to a path of a library which has a package.json that has a main property and not exports property, the function findFirstExistingMainFieldMappedFile ignores the package.json and doesn't actually continues to figure out if there's a main field...

it also doesn't work when using:

"exports": "./index.js"

only with:

"exports": {
  ".": "./index.js"
}

I can fix this with a PR but before I do I wanted to verify that it has a chance to get merged

Thanks for this library! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions