Skip to content

@babel/preset-env includes transform-template-literals for safari #10740

@heygrady

Description

@heygrady

https://github.com/babel/babel/blob/master/packages/babel-preset-env/data/plugins.json#L2-L10

https://caniuse.com/#feat=template-literals

Seems like there was a critical bug that affected template literals in safari 12 and ios 12.1. However, the issue was fixed and doesn't affect newer versions.

It's probably impossible to skip just those broken versions... but we're punishing future versions unnecessarily.

I propose we re-enable excluding this transform for versions newer than the broken versions.

"transform-template-literals": {
    "chrome": "41",
    "edge": "13",
    "firefox": "34",
    "safari": "12.1", // <--
    "node": "4",
    "ios": "12.2", // <--
    "samsung": "3.4",
    "opera": "28",
    "electron": "0.24"
  },

I'm running into this issue while trying to configure multiple builds for my project. I noticed that targeting only latest chrome, firefox and safari was still including this transform "for no reason". My best guess is that safari and ios are excluded because of that bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Has PRarea: compat-tableoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions