-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
fix: update exports in package.json #3
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
hope they fix it soon. |
I was hesitating with that, not sure what was using it. |
"exports": { | ||
".": { | ||
"import": "./dist/index.mjs", | ||
"module": "./dist/index.mjs", |
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.
Never seen a "module"
key there, do you know why it is used for? According to conditional exports spec, valid values seem to be node-addons
, node
, import
and require
.
Regarding the build, if you want to provide a "commonjs" (eg. "require") export you might want to check tsup, which is a simpler alternative to rollup that makes that a breeze.
Thanks for the lib!
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 don't want to provide a cjs alternative. I don't know @gabrielelpidio why did you add "module" entry? Can I remove it?
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 based it off SWR package.json it might be safe to remove though
Summary
Solves: #2
Test plan
Tested with
pnpm link --global
:Before:
After: