Skip to content

Commit

Permalink
fix(js): add @babel/plugin-transform-class-properties to babel preset
Browse files Browse the repository at this point in the history
  • Loading branch information
danzrou committed Oct 24, 2023
1 parent 2c850cf commit eeb301f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/shared/mental-model/large-tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -21040,6 +21040,7 @@
"npm:@babel/plugin-proposal-class-properties",
"npm:@babel/plugin-proposal-decorators",
"npm:@babel/plugin-transform-runtime",
"npm:@babel/plugin-transform-class-properties",
"npm:@babel/preset-env",
"npm:@babel/preset-typescript",
"npm:@babel/runtime",
Expand Down
3 changes: 2 additions & 1 deletion packages/js/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
"@swc/cli",
"babel-plugin-const-enum",
"babel-plugin-macros",
"babel-plugin-transform-typescript-metadata"
"babel-plugin-transform-typescript-metadata",
"@babel/plugin-transform-class-properties"
]
}
]
Expand Down
1 change: 1 addition & 0 deletions packages/js/babel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions packages/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit eeb301f

Please sign in to comment.