Skip to content

@babel/preset-env #2497

Open
Open

Description

@thernstig

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?)

Activity

  1. babel-bot commented on Apr 15, 2021

    @babel-bot
    Contributor

    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.

  2. nicolo-ribaudo commented on Apr 16, 2021

    @nicolo-ribaudo
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions