Skip to content

Preset-env loads unnecessary polyfills for Android >= 52 #10789

@JLHwung

Description

@JLHwung

Bug Report

Current Behavior
The following snippet is transpiled

Input Code

class A {};

Expected behavior/code
It is not transpiled on Chrome >= 52, so it should not be transpiled when Android >= 52, which shares the same language features support with Chrome.

Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)

  • Filename: babel.config.js
{
  "presets": ["@babel/env", { "targets": "Android >= 52" }]
}

Environment
REPL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions