babel/packages/babel-helper-create-class-features-plugin
王清雨 aa18da08cd
fix(class-properties): replace new.target in static properties with undefined (#13560)
* fix(class-properties): replace `new.target` in static properties with `undefined`

non-static prop is not affected

fix #12737

* Update packages/babel-helper-create-class-features-plugin/src/fields.ts

fix typo

Co-authored-by: Brian Ng <bng412@gmail.com>

* fix: add loose test case and fix replace condition

* test: add new.target tests for static block

* feat: move new-target replace into thisContextVisitor

defaults to replace new.target, do not replace within function

* feat: simplify thisContextVisitor

remove function visitor since environmentVisitor is skipping arrow function

* test: remove unused fixme comments

Co-authored-by: Brian Ng <bng412@gmail.com>
2021-07-16 15:58:55 -04:00
..
2021-06-14 21:45:36 +00:00

@babel/helper-create-class-features-plugin

Compile class public and private fields, private methods and decorators to ES6

See our website @babel/helper-create-class-features-plugin for more information.

Install

Using npm:

npm install --save-dev @babel/helper-create-class-features-plugin

or using yarn:

yarn add @babel/helper-create-class-features-plugin --dev