Closed 3cp closed 4 months ago
I get this error when making changes
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/ivan/Workspace/DLAB/Searobend/Repositories/searobend-client/src/main.js: The decorators plugin, when .version is '2018-09' or not specified, requires a 'decoratorsBeforeExport' option, whose value must be a boolean.
{
"presets": [
[
"@babel/preset-env",
{
"loose": true,
"modules": false,
"exclude": [
"@babel/plugin-proposal-dynamic-import"
]
}
]
],
"plugins": [
"@babel/plugin-transform-class-static-block",
[
"@babel/plugin-proposal-decorators",
{
"version": "2023-11"
}
],
[
"@babel/plugin-transform-class-properties",
{
"loose": true
}
],
"@babel/plugin-syntax-dynamic-import"
]
}
I had to add @babel/plugin-transform-class-static-block
to get it to work correctly. Also the decoratorsBeforeExport": true
option in @babel/plugin-proposal-decorators
did not really seem to do anything. Did not really matter if it was there or not.
transform-class-static-block, I assume you use static block in your code?
transform-class-static-block, I assume you use static block in your code?
Hmm, never mind about the transform-class-static-block
. After applying changes from your latest commits it seems to be working without it 🤯.
Thanks for making these changes so quickly.
Not tested. I rely on CI for the validation :-) TS is much easier to setup, since TS checks the typing of the decorator, it knows which version it uses.
au2 has adopted latest decorator spec.
closes aurelia/aurelia#1946, #102