Skip to content

Document exports in package.json's (for the regular use and for within publishConfig) #6243

@Ayc0

Description

@Ayc0
  • I'd be willing to implement this feature (contributing guide)
  • This feature is important to have in this repository; a contrib plugin wouldn't do

Describe the user story

publishConfig can be used to override some top level fields on publish.
According to https://yarnpkg.com/configuration/manifest#publishConfig, you can only set in it:

  • access
  • bin
  • browser
  • executableFiles
  • main
  • module
  • registry
  • type

But not exports. To note: exports field replaces main, module, and type so it'd make sense to support it

According to #5874, exports does work in here, but I haven't tested it myself.

Describe the solution you'd like

Support exports in publishConfig

And if it's already supported, document it

Describe the drawbacks of your solution

None

Describe alternatives you've considered

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationThis issue or pull request is about the documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions