vue3,按照jsx官网进行一系列配置后出现:
This experimental syntax requires enabling one of the following parser plugin(s): "jsx", "flow", "typescript"。
解决方法:
在script中加入 lang="jsx", 如果是tsx,则改成 lang="tsx"
在vue3最新版本中,已作为预设项,也就是babel.config.js中jsx的plugins选项可写可不写
vue3,按照jsx官网进行一系列配置后出现:
This experimental syntax requires enabling one of the following parser plugin(s): "jsx", "flow", "typescript"。
解决方法:
在script中加入 lang="jsx", 如果是tsx,则改成 lang="tsx"
在vue3最新版本中,已作为预设项,也就是babel.config.js中jsx的plugins选项可写可不写