用vue3-cli创建的应用 会有这个报错
Option 'importsNotUsedAsValues' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
Use 'verbatimModuleSyntax' instead.
对项目没什么影响,但我是强迫症患者,主要起作用的是下面这行代码
"ignoreDeprecations": "5.0"
tsconfig.node.json配置文件
{
"extends": "@vue/tsconfig/tsconfig.node.json",
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
"compilerOptions": {
"ignoreDeprecations": "5.0",
"composite": true,
"types": ["node"]
}
}
tsconfig.json配置文件
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"include": [
"env.d.ts",
"src/**/*",
"src/**/*.vue",
],
"compilerOptions": {
"ignoreDeprecations": "5.0",
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
]
}
},
"references": [
{
"path": "./tsconfig.node.json"
}
]
}