-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Core: Replace preset-env polyfills with babel-polyfills #13055
Conversation
Yes, this will be the recommended way starting from Babel 8 👍 I want to add that even if this package's version is currently The way you migrate to the new plugin in this PR is correct. |
awesome, thanks for taking time to explain that. and from what i can gather, setting the new flag to |
It is relative to the config file where storybook's preset is enabled, or to cwd if the preset is enabled in the programmatic options. I don't know how you enable this preset, but maybe it would be better to:
|
yeah thats a good idea i think. we already have core-js as a dependency but should probably resolve to it here rather than leave it up to babel. ill change it |
Should be fine to remove storybook/scripts/run-e2e-config.ts Lines 168 to 169 in 6a3bf80
|
done. also i noticed almost every package we have has a core-js dependency. are they still needed? |
@nicolo-ribaudo do we have any timeline for when the merged pr in babel-polyfills will be published? just so i know to keep an eye on it if its soon. or if you could let me know in here when it is, that'd be super useful |
I'm updating some deps and then I'll release. |
Released |
great, thanks for the quick turnaround on that :D have pushed the updated one here too |
i have tried this in two test repos:
with this branch, both worked fine! maybe we have fixed it finally? 😂 |
i do still need to know if all the sub-packages can drop the corejs dependency too. pretty much every package we have has a corejs dependency in their package.json (every app/, addon/, etc). |
Depends if they actually use it or if it was a workaround to get it to work before this PR |
The packages that are transpiled before publish will need to declare |
@shilman let's merge? |
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.
PnP is happy so LGTM 👍
@ndelangen I'm going to make the cut over to 6.2 on Monday. Will merge then. |
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.
Need to remove useBuiltIns: 'usage', corejs: '3'
from here as well
{ shippedProposals: true, useBuiltIns: 'usage', corejs: '3' }, |
# Conflicts: # app/react/src/server/framework-preset-react.test.ts
…n to add core-js dependecies
👏 |
Issue: #11255.
Another attempt, this time it depends on babel/babel-polyfills#40
presumably what they will want us to do is use the babel-polyfills plugin rather than the preset-env corejs config. the docs seem to suggest thats the way forward, so this is just a draft of doing it that way