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

fix: update exports in package.json #3

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

gabrielelpidio
Copy link
Contributor

Summary

Solves: #2

Test plan

Tested with pnpm link --global:

Before:

image
image

After:
image
image

Copy link

vercel bot commented Dec 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
twc ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 22, 2023 1:19am

@ImRLopezAG
Copy link

hope they fix it soon.

@gregberge
Copy link
Owner

I was hesitating with that, not sure what was using it.

@gregberge gregberge merged commit 66848fd into gregberge:main Dec 22, 2023
5 checks passed
"exports": {
".": {
"import": "./dist/index.mjs",
"module": "./dist/index.mjs",
Copy link

@mgcrea mgcrea Dec 22, 2023

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!

Copy link
Owner

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?

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 based it off SWR package.json it might be safe to remove though

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.

4 participants