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

breaking(build): drop module condition in exports #1675

Merged
merged 7 commits into from
Jan 31, 2023

Conversation

dai-shi
Copy link
Member

@dai-shi dai-shi commented Jan 10, 2023

"module" condition was added for non-native ESM to possibly support old bundlers.
Not sure, if/how it's used. Maybe, it was added for webpack 4, but not required for v2.

@vercel
Copy link

vercel bot commented Jan 10, 2023

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

Name Status Preview Comments Updated
jotai ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 31, 2023 at 1:19AM (UTC)

@dai-shi
Copy link
Member Author

dai-shi commented Jan 10, 2023

what do you think? @barelyhuman

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 10, 2023

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 b2e680d:

Sandbox Source
React Configuration
React Typescript Configuration
React Browserify Configuration
React Snowpack Configuration
Next.js Configuration
Next.js with custom Babel config Configuration
React with custom Babel config Configuration

@github-actions
Copy link

github-actions bot commented Jan 10, 2023

Size Change: -12.1 kB (-16%) 👏

Total Size: 63.3 kB

Filename Size Change
dist/esm/babel/plugin-debug-label.js 0 B -869 B (removed) 🏆
dist/esm/babel/plugin-react-refresh.js 0 B -1.08 kB (removed) 🏆
dist/esm/babel/preset.js 0 B -1.35 kB (removed) 🏆
dist/esm/index.js 0 B -61 B (removed) 🏆
dist/esm/react.js 0 B -1.01 kB (removed) 🏆
dist/esm/react/utils.js 0 B -535 B (removed) 🏆
dist/esm/utils.js 0 B -67 B (removed) 🏆
dist/esm/vanilla.js 0 B -3.03 kB (removed) 🏆
dist/esm/vanilla/utils.js 0 B -4.09 kB (removed) 🏆
ℹ️ View Unchanged
Filename Size
dist/babel/plugin-debug-label.js 876 B
dist/babel/plugin-react-refresh.js 1.11 kB
dist/babel/preset.js 1.35 kB
dist/index.js 229 B
dist/react.js 1.06 kB
dist/react/utils.js 1.23 kB
dist/system/babel/plugin-debug-label.development.js 970 B
dist/system/babel/plugin-debug-label.production.js 728 B
dist/system/babel/plugin-react-refresh.development.js 1.18 kB
dist/system/babel/plugin-react-refresh.production.js 899 B
dist/system/babel/preset.development.js 1.45 kB
dist/system/babel/preset.production.js 1.1 kB
dist/system/index.development.js 236 B
dist/system/index.production.js 167 B
dist/system/react.development.js 1.17 kB
dist/system/react.production.js 714 B
dist/system/react/utils.development.js 677 B
dist/system/react/utils.production.js 424 B
dist/system/utils.development.js 241 B
dist/system/utils.production.js 175 B
dist/system/vanilla.development.js 3.12 kB
dist/system/vanilla.production.js 1.66 kB
dist/system/vanilla/utils.development.js 4.33 kB
dist/system/vanilla/utils.production.js 2.69 kB
dist/umd/babel/plugin-debug-label.development.js 1.04 kB
dist/umd/babel/plugin-debug-label.production.js 819 B
dist/umd/babel/plugin-react-refresh.development.js 1.26 kB
dist/umd/babel/plugin-react-refresh.production.js 985 B
dist/umd/babel/preset.development.js 1.49 kB
dist/umd/babel/preset.production.js 1.21 kB
dist/umd/index.development.js 365 B
dist/umd/index.production.js 316 B
dist/umd/react.development.js 1.19 kB
dist/umd/react.production.js 805 B
dist/umd/react/utils.development.js 1.39 kB
dist/umd/react/utils.production.js 1 kB
dist/umd/utils.development.js 376 B
dist/umd/utils.production.js 327 B
dist/umd/vanilla.development.js 3.92 kB
dist/umd/vanilla.production.js 1.82 kB
dist/umd/vanilla/utils.development.js 5.07 kB
dist/umd/vanilla/utils.production.js 3.14 kB
dist/utils.js 236 B
dist/vanilla.js 3.83 kB
dist/vanilla/utils.js 4.91 kB

compressed-size-action

@barelyhuman
Copy link
Collaborator

This was added for snowpack if I remember properly, since it didn't pick up the import key, let me see if it can pick it up now and we should be able to move forward with this, also , reminder, don't trust the codesandbox for this since it's flaky for snowpack package resolutions

@barelyhuman
Copy link
Collaborator

Confirmed,
Seems to be working 👍🏼

@dai-shi dai-shi added this to the v2.0.0 milestone Jan 23, 2023
@dai-shi dai-shi marked this pull request as ready for review January 23, 2023 05:51
@dai-shi dai-shi merged commit 0221785 into main Jan 31, 2023
@dai-shi dai-shi deleted the breaking/drop-module-condition-in-exports branch January 31, 2023 01:20
@dai-shi
Copy link
Member Author

dai-shi commented Feb 8, 2023

Checking #1756 if this is related.

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