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:
parent
bf97dbb2ba
commit
2ea9f18fad
@ -99,6 +99,7 @@ module.exports = function (api: any, options: NxWebBabelPresetOptions = {}) {
|
||||
require.resolve('@babel/plugin-proposal-decorators'),
|
||||
options.decorators ?? { legacy: true },
|
||||
],
|
||||
[require.resolve('@babel/plugin-transform-class-properties'), { loose }],
|
||||
].filter(Boolean),
|
||||
overrides: [
|
||||
// Convert `const enum` to `enum`. The former cannot be supported by babel
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
"@babel/core": "^7.22.9",
|
||||
"@babel/plugin-proposal-decorators": "^7.22.7",
|
||||
"@babel/plugin-transform-runtime": "^7.22.9",
|
||||
"@babel/plugin-transform-class-properties": "^7.22.5",
|
||||
"@babel/preset-env": "^7.22.9",
|
||||
"@babel/preset-typescript": "^7.22.5",
|
||||
"@babel/runtime": "^7.22.6",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user