0
点赞
收藏
分享

微信扫一扫

Vue 插件:安装、配置、警告错误处理

Vetur

Vetur 安装后,提示警告:

Target version not match, you can specify the target version in vueCompilerOptions.target in tsconfig.json / jsconfig.json. (expected “target”: 2.7)

这是因为安装了vue3对应的插件volar之后,又打开了vue2版本的项目导致的,需要在jsconfig.json里主动指明当前版本。

项目根目录,新建 jsconfig.json 文件:指定 Vue 当前版本是 2.7 ;

{
"vueCompilerOptions": {
"target": 2.7
}
}

完整版参考:

{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"vueCompilerOptions": {
"target": 2.7
}
}

举报

相关推荐

0 条评论