Skip to content

Conversation

@mallachari
Copy link

Needed by stoplightio/elements#1392

Having exports property set to:

{
  "require": "./index.js",
  "import": "./index.mjs"
}

encapsulates exported packages preventing any other to be used. This PR allows setting custom packages by defining them in the original package.json file.

This way using

"exports": {
  "./styles.min.css": "./styles.min.css"
}

results in

"exports": {
  "./styles.min.css": "./styles.min.css",
  ".": {
    "require": "./index.js",
    "import": "./index.mjs"
  }
}

@mallachari mallachari self-assigned this Jul 20, 2021
@mallachari mallachari requested a review from mmiask July 20, 2021 19:35
Copy link
Contributor

@mpodlasin mpodlasin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mallachari mallachari requested a review from marbemac July 20, 2021 21:36
@mallachari mallachari merged commit 48c5b1e into master Jul 21, 2021
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version 9.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@marcelltoth
Copy link
Contributor

Awesome work @mallachari !

@P0lip P0lip deleted the feat/exports-custom-packages branch September 14, 2022 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants