website icon indicating copy to clipboard operation
website copied to clipboard

@babel/preset-env

Open thernstig opened this issue 4 years ago • 2 comments

https://babeljs.io/docs/en/babel-preset-env#how-does-it-work mentions:

We leverage these data sources to maintain mappings of which version of our supported target environments gained support of a JavaScript syntax or browser feature, as well as a mapping of those syntaxes and features to Babel transform plugins and core-js polyfills.

If I understood it correctly, that text is somewhat misleading. The mappings of which version part only lists plugins that will transform the code. It is written like it is a complete list of of all Javascript and syntax features to certain browser versions.

Would it not be more clear to somehow re-write the text so that the link to plugins.json is just used for transpilation i.e. Babel transform plugins (which I think it is?) and then for the polyfill part with core-js separately (with another link if there is one for those mappings?)

thernstig avatar Apr 15 '21 09:04 thernstig

Hey @thernstig! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.

babel-bot avatar Apr 15 '21 09:04 babel-bot

You are right, data for the different polyfills are maintained in the polyfill itself or in the integration plugins:

nicolo-ribaudo avatar Apr 16 '21 15:04 nicolo-ribaudo