-
Notifications
You must be signed in to change notification settings - Fork 535
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
Convert @primer/react to ESM, don't generate CommonJS bundle. #3410
Conversation
🦋 Changeset detectedLatest commit: 4b752b0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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-limit report 📦
|
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.
Looking great! Just left a comment for the package.json
file itself 👀
@radglob just wanted to double check, I'm still not seeing |
Yeah, that was a mistake on my part. I think I got distracted changing up the exports. |
Closing this out due to the technical limitations mentioned in: #3565 😞 Will make sure to use this as the base for any follow-up ESM work 🤞 |
Changed some configuration files to use
.cjs
extension, others to use.mjs
extension, and remove settings to produce CommonJS bundle.There are likely a lot more changes we could make (ex. only using
import
instead ofrequire
in some places) but this seems to produce an ESM bundle and continues to work correctly in a toy project.Closes #2108.
Screenshots
Please provide before/after screenshots for any visual changes
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.