-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
package.json
Outdated
"exports": { | ||
".": { | ||
"default": "./dist/index.js", | ||
"require": null | ||
} | ||
}, | ||
"main": "dist/index.js", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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
🤦