-
Notifications
You must be signed in to change notification settings - Fork 893
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
Add CJS browser entry points for all packages #6981
Conversation
🦋 Changeset detectedLatest commit: 3d2bc9a The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
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.
LGTM
Jest in JSDOM mode expects browser-specific CJS packages to exist. Added CJS browser builds in packages where we don't have them and added
exports.browser
paths to point to them. (Note: packages that do not have separate Node and browser bundles do not useexports.node
andexports.browser
fields - a top levelrequire
field points at the CJS bundle and thedefault
field points at the ESM bundle. Jest will recognize and use the top levelrequire
field.)See https://github.com/uuidjs/uuid/pull/642/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519 for similar fix in
uuid
.Note: Jest has experimental support for ESM and will probably make it officially supported at some point. We should test and make sure our setup and entry points work in that arrangement as well.