I am upgrading vue from 2.5 to 2.7. Before this, I use vue-property-decorator in my project, and this error occured in the file which use vue-property-decorator and tsx.
Error detail:
[plugin:vite:vue2-jsx] unknown: Support for the experimental syntax 'decorators' isn't currently enabled (34:1):
I am upgrading vue from 2.5 to 2.7. Before this, I use
vue-property-decorator
in my project, and this error occured in the file which usevue-property-decorator
andtsx
.Error detail:
[plugin:vite:vue2-jsx] unknown: Support for the experimental syntax 'decorators' isn't currently enabled (34:1):
Add @babel/plugin-proposal-decorators (https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators) to the 'plugins' section of your Babel config to enable transformation. If you want to leave it as-is, add @babel/plugin-syntax-decorators (https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators) to the 'plugins' section to enable parsing.