-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Meta: Polyfills + Babel helpers #6628
Comments
I don't think external-helpers should be a thing if you're going to use a module system; transform-runtime with useBuiltIns should already cover everything without adding an extra global to the application. If you're going to separate things into libraries and apps, I think that libraries should only use helpers and use the built-ins from the environment. It is up to the app to provide the polyfills if the environment you expect to run on is outdated. If, for some reason, you still want to prevent your app from patching your environment, you can do a transform-runtime pass on all files transforming builtins. |
Agreed on polyfills, but I think helpers belong in the libraries themselves. If I'm writing a library that doesn't need polyfills, my library should work out of the box by someone not using Babel (i.e. they should not need to provide the babel helpers). As mentioned in #5601, I propose having a standalone |
I'm doing some issues cleanup, all the points in the original issue have been either solved, or are not actionable from Babel (for example, the webpack chunks). |
Just going to make another issue to talk about the ideal scenario for both polyfills and babel helpers and how we can get there via babel-preset-env.
How can we write ES20xx and ship the smallest amount of code (for a given target environment)?
type: "library"
)?type: "app"
)?The text was updated successfully, but these errors were encountered: