This PR allows legacy decorators to work with strict class fields, which are now stage 3 and have shipped in a number of browsers. Allowing this will allow users of the legacy transform (which is currently recommended by the champions of the decorator proposal) to use the proper class field semantics for non-decorated fields, which should help prevent breakage later on. This change is not a breaking change, since users had to explicitly opt into loose mode in class fields before. This just gives them the option to remove that opt-in.
@babel/plugin-proposal-class-properties
This plugin transforms static class properties as well as properties declared with the property initializer syntax
See our website @babel/plugin-proposal-class-properties for more information.
Install
Using npm:
npm install --save-dev @babel/plugin-proposal-class-properties
or using yarn:
yarn add @babel/plugin-proposal-class-properties --dev