Answer the question
In order to leave comments, you need to log in
What babel preset is needed and how to connect it?
{
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
["@babel/plugin-proposal-class-properties", { "loose": false }],
"@babel/plugin-proposal-json-strings"
]
}
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader'
}
]
},
class Something {
#property;
constructor() {
this.#property = "test";
}
}
const instance = new Something();
console.log(instance.property);
Answer the question
In order to leave comments, you need to log in
If you are using babel version 7, then the stage-3 preset and the others are marked as deprecated. https://babeljs.io/docs/en/babel-preset-stage-3
There is also a link to the documentation on what to do https://github.com/babel/babel/blob/master/package...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question