When specifying transform-class-properties in brunch-config.js like this:
plugins: {
babel: {
plugins: ["transform-class-properties"]
}
}
we get no errors, but when solely specifying in .babelrc and not in the brunch config, we get an Missing class properties transform error. This does not happen with other transform-plugins, such as transform-decorators or transform-object-rest-spread for example.
Expected behaviour: No error
Actual behaviour: Missing class properties transform error.
EDIT: Here's the error
01:40:02 - error: Compiling of app/test.js failed. L6:4 Missing class properties transform.
4 |
5 | class Foo {
> 6 | static bar = 'bar';
| ^
7 | }
brunch-config.js:
exports.files = {
javascripts: {
entryPoints: { 'app/initialize.js': 'app.js' }
},
stylesheets: {joinTo: 'app.css'}
};
exports.modules = {
autoRequire: {'app.js': ['initialize']}
};
.babelrc:
{
"presets": [
"latest",
"react"
],
"plugins": [
"transform-class-properties",
"transform-decorators",
"transform-object-rest-spread"
]
}
npm up-to-date
node up-to-date
dependencies up-to-date
When specifying
transform-class-propertiesinbrunch-config.jslike this:we get no errors, but when solely specifying in
.babelrcand not in the brunch config, we get anMissing class properties transformerror. This does not happen with other transform-plugins, such astransform-decoratorsortransform-object-rest-spreadfor example.Expected behaviour: No error
Actual behaviour:
Missing class properties transformerror.EDIT: Here's the error
brunch-config.js:.babelrc:npmup-to-datenodeup-to-datedependencies up-to-date