fix(js): add @babel/plugin-transform-class-properties to babel preset (#19818)

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
This commit is contained in:
Dan Roujinsky 2023-10-26 19:51:58 +03:00 committed by GitHub
parent bf97dbb2ba
commit 2ea9f18fad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -99,6 +99,7 @@ module.exports = function (api: any, options: NxWebBabelPresetOptions = {}) {
require.resolve('@babel/plugin-proposal-decorators'), require.resolve('@babel/plugin-proposal-decorators'),
options.decorators ?? { legacy: true }, options.decorators ?? { legacy: true },
], ],
[require.resolve('@babel/plugin-transform-class-properties'), { loose }],
].filter(Boolean), ].filter(Boolean),
overrides: [ overrides: [
// Convert `const enum` to `enum`. The former cannot be supported by babel // Convert `const enum` to `enum`. The former cannot be supported by babel

View File

@ -33,6 +33,7 @@
"@babel/core": "^7.22.9", "@babel/core": "^7.22.9",
"@babel/plugin-proposal-decorators": "^7.22.7", "@babel/plugin-proposal-decorators": "^7.22.7",
"@babel/plugin-transform-runtime": "^7.22.9", "@babel/plugin-transform-runtime": "^7.22.9",
"@babel/plugin-transform-class-properties": "^7.22.5",
"@babel/preset-env": "^7.22.9", "@babel/preset-env": "^7.22.9",
"@babel/preset-typescript": "^7.22.5", "@babel/preset-typescript": "^7.22.5",
"@babel/runtime": "^7.22.6", "@babel/runtime": "^7.22.6",