Skip to content

Add package.json to exports #157

@redexp

Description

@redexp

I'm using this module in react-native project and without next modification to package.json file it throws warning

warn Package normalize-url has been ignored because it contains invalid configuration. 
Reason: Package subpath './package.json' is not defined by "exports" in node_modules/normalize-url/package.json

Modification needed

{
  "exports": {
    ".": "./index.js",
    "./package.json": "./package.json"
  }
}

I think it's because of Introducing the "exports" field prevents consumers of a package from using any entry points that are not defined docs and webpack needs access to package.json

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