-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
chore(react): use babel runtime on es builds #9833
chore(react): use babel runtime on es builds #9833
Conversation
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: b02bb9d 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/61771b99b6b7ea00075ecac6 😎 Browse the preview: https://deploy-preview-9833--carbon-react-next.netlify.app |
DCO Assistant Lite bot All contributors have signed the DCO. |
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: b02bb9d 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/61771b99b6ea0500083d04de 😎 Browse the preview: https://deploy-preview-9833--carbon-components-react.netlify.app/ |
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: b02bb9d 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/61771b99b626b90007ac8821 😎 Browse the preview: https://deploy-preview-9833--carbon-elements.netlify.app |
I have read the DCO document and I hereby sign the DCO. |
recheck |
I have read the DCO document and I hereby sign the DCO. |
recheck |
@salvoravida Thanks for doing this! I think we'll also need to include |
It is already included by babel. not needed. |
@salvoravida I think it will need to be included based on: https://babeljs.io/docs/en/babel-plugin-transform-runtime#technical-details Not everyone will be using babel directly, e.g. some could be using Rollup or esbuild so we can't transitively depend don't this through Let me know if I'm misunderstanding, I think the number one thing was just making sure that if a file gets transpiled to import |
Yes, I have added "@babel/runtime": "^7.14.6", as dependencies (is the one already downloaded by other dep, so it will not be duplicated) TL;DR @babel/runtime share all the ES5 polyfill without duplication for each file! |
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.
Sorry - actually needs a yarn
to update the lockfile. I'll pull this down and do it.
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.
Done 👍 LGTM if status checks pass
@salvoravida just wanted to ask, could this be something that works for CommonJS builds as well? I noticed that this one was only targeting ESM 👀 |
sure! done! |
chore(react): use babel runtime on es builds
Hi guys!
This PR adds @babel/runtime on es builds. -> less 60/100k on your bundle.js depended on how many components are used.