Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added exports field to package.json #4

Merged
merged 3 commits into from
Oct 19, 2022
Merged

Added exports field to package.json #4

merged 3 commits into from
Oct 19, 2022

Conversation

chudoklates
Copy link
Contributor

🤦

@chudoklates chudoklates added WIP and removed WIP labels Oct 18, 2022
package.json Outdated
Comment on lines 13 to 19
"exports": {
".": {
"default": "./dist/index.js",
"require": null
}
},
"main": "dist/index.js",
Copy link
Member

Choose a reason for hiding this comment

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

What's the benefit of this exports field as opposed to just main? IIUC one or the other is obsolete, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe main is still used as fallback in case exports cannot be used

"exports": {
".": {
"require": null,
"default": "./dist/index.js"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

default needs to be the last property for this to work

@kgrhartlage kgrhartlage merged commit 9fdc524 into develop Oct 19, 2022
@kgrhartlage kgrhartlage deleted the hotfix/exports branch October 19, 2022 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants