-
-
Notifications
You must be signed in to change notification settings - Fork 158
Meta: Polyfills + Babel helpers #248
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 babel/babel#5601, I propose having a standalone |
This issue has been moved to babel/babel#6628. |
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: