Public class properties are not transformed with babel-env preset targeting latest Chrome, and shippedProposals enabled

Bug Report

  • I would like to work on a fix!

Current behavior

  • REPL does not transform class fields without explicitly adding plugin @babel/plugin-proposal-class-properties.

Expected behavior

Since the targets field is last 1 Chrome versions, and public class fields are supported in last 15 Chrome versions, as well as FF, I expect that code should not cause problems.

Environment

  • Babel version(s): v7.12.0
  • Node/npm version: Node 15.5/npm 7.3
  • OS: Ubuntu 16.04
  • Monorepo: no
  • How you are using Babel: webpack

1 possible answer(s) on “Public class properties are not transformed with babel-env preset targeting latest Chrome, and shippedProposals enabled

  1. I have bisected and this bug in @babel/standalone has been fixed by #12651.

    shippedProposals at line 101833 of babel.js should be a reference to line 90430, but the declaration at line 90430 was shadowed by line 101782.

    I’m closing this issue since it is fixed on main, the fix will be released in the next version.