Screenshot of the error:
Solution""
1. First you need to download dependencies
npm install @vue/babel-preset-jsx @vue/babel-helper-vue-jsx-merge-props --save
2. After the download is complete, create a new .babelrc file in the project file (if not)
After the creation is complete, write the following code in the file:
{
"presets": [
["@babel/preset-env", { "modules": false }],
"@vue/babel-preset-jsx" // 支持jsx语法
],
"plugins": [
"@babel/plugin-proposal-class-properties"
]
}
3. After the setting is complete, restart the project
success!