-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
remove proposals polyfills from default import [skip ci] #8440
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/8779/ |
2e23a24
to
4d89c12
Compare
We should also update polyfill docs and also add this change to the upgrade doc. |
So, how do we include polyfills for Any input would be great! @hzoo |
You should import then directy from the e.g. import "core-js/fn/array/flatMap"; |
Ok I updated it a bit as well babel/website@3db6772 |
Awesome, thank you both! |
Summary: This diff is fixing the UI on old Chrome versions / IE. Apparently Array.flat is not included in babel plyfill and need to be included manually - see: babel/babel#8440 https://babeljs.io/docs/en/v7-migration Reviewed By: elys1um Differential Revision: D15334182 fbshipit-source-id: f7704a898ede36a8352b916771574dbba8721f22
The default import is replaced with only polyfills that are Stage 4, instead of also including the Stage < 4 polyfills. This should be in alignment with how we have removed the Stage presets. This also would mean we would need to add new imports when necessary.
And it sounds like we desire to also add the polyfill proposals individually? There's a maintenance cost to that too (not that bad) but then I wonder why we aren't just linking to the polyfill to use (that would just mean removing
babel/polyfill
as a package, as people may want to use other polyfills too) since we are just aliasing it. So do we really want to do this?For the proposals in v2:
from logan:
write-polyfills.js