I enabled checkbox "ECMAScript 2022 (via babel-minify)" and get following error :
SyntaxError: unknown: Support for the experimental syntax 'classPrivateProperties' isn't currently enabled (2:3):
1 | class ClassWithPrivateField {
2 | #privateField;
| ^
3 | }
4 |
5 |
Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-class-properties (https://git.io/vb4yQ) to the 'plugins' section to enable parsing.
I enabled checkbox "ECMAScript 2022 (via babel-minify)" and get following error :
SyntaxError: unknown: Support for the experimental syntax 'classPrivateProperties' isn't currently enabled (2:3):
1 | class ClassWithPrivateField {
Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation. If you want to leave it as-is, add @babel/plugin-syntax-class-properties (https://git.io/vb4yQ) to the 'plugins' section to enable parsing.
More info on "#privateField" : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields