Open Mihailoff opened 1 year ago
Thanks for your feedback.
Do you mean this lib should enable the new class docorator sytax for vue.js .vue file?
@annotation
class MyClass {}
If so, maybe you can try add the babel plugin by the option of this lib: https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/doc/Usage.md#1-babel-options-customization
For example:
// vue.config.js
module.exports = {
chainWebpack: config => {
config.module
.rule('vue')
.use('vue-loader')
.tap(options => {
options.compilerOptions.babelOptions = {
plugins: [
'@babel/plugin-proposal-decorators'
]
}
options.compiler = require('vue-template-babel-compiler')
return options
})
}
}
If you could provide more context about how you use this anotation syntax in .vue file, I would like to help you more.
https://babeljs.io/docs/en/babel-plugin-proposal-decorators https://babeljs.io/blog/2022/09/05/7.19.0