-
-
Notifications
You must be signed in to change notification settings - Fork 26.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
Ship additional required polyfills #269
Comments
Is it potentially problematic that babel-runtime vendors core-js? If react-scripts takes a dependency on core-js for default polyfills, it won't be deduplicated by npm. |
TIL. Wow, that's a bit inconvenient for this use case. I guess babel-runtime has to vendor core-js though. I suggested babel-runtime as it would only bring in those polyfills if needed. Directly bringing in the polyfills would also work, though. |
Having |
For future reference, this is currently blocked on babel/babel#4418. |
The babel issue babel/babel#4418 is closed now. However I think this issue could be closed as well because I believe the rest is covered by #2391 (Babel 7 Umbrella) |
Thanks @clarkbw! I think Inbox swallowed my email notification here or something, so I didn't see this until just now. |
Follow-up from #198, #238.
Per http://babeljs.io/docs/usage/caveats/#polyfills, generators are not the only supported language feature that require a polyfill.
Array destructuring, for-of loops, and the array spread operator all require additional polyfills. As such, this project should also ship polyfills for
Symbol
andArray.from
.It would be possible to accomplish when needed this just by re-enabling transpiling the helpers for the Babel runtime transform, though because of https://phabricator.babeljs.io/T7519, a few of the helpers pull in the
Symbol
polyfill unnecessarily.The text was updated successfully, but these errors were encountered: