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: package.json exports to have import #583

Merged
merged 1 commit into from
Jul 9, 2021

Conversation

dai-shi
Copy link
Member

@dai-shi dai-shi commented Jul 8, 2021

We had some discussions in pmndrs/valtio#169.
Like valtio, jotai uses lots of module states.
So, this change suffers from dual package hazard.
However, we feel the benefit is bigger because cjs build is built for traditional browsers and esm build is always recommended if possible.

Would anyone please try this, and if it works fine? (You can install the codesandbox build with npm/yarn.)

@vercel
Copy link

vercel bot commented Jul 8, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pmndrs/jotai/8dmKpLEwMG1o12MhorBrU2nCJinF
✅ Preview: https://jotai-git-fix-package-exports-import-pmndrs.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 8, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7ef246d:

Sandbox Source
React Configuration
React Typescript Configuration

@aulneau
Copy link
Collaborator

aulneau commented Jul 8, 2021

I've tested this in a next.js project and works fine (no difference)

@dai-shi
Copy link
Member Author

dai-shi commented Jul 8, 2021

Thanks!

@dai-shi dai-shi merged commit 85ddade into master Jul 9, 2021
@dai-shi dai-shi deleted the fix/package-exports-import branch July 9, 2021 13: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.

2 participants