Option ‘importsNotUsedAsValues‘ has been removed. Please remove it from your configuration
1、背景在前端项目中的tsconfig.json中 compilerOptions 报红鼠标放上去会显示如下内容Option importsNotUsedAsValues has been removed. Please remove it from your configuration. Use verbatimModuleSyntax instead.tsOption preserveValueImports has been removed. Please remove it from your configuration. Use verbatimModuleSyntax instead.tsOption moduleResolutionnode10 is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption ignoreDeprecations: 6.0 to silence this error.Visit https://aka.ms/ts6 for migration information.2、原因从上面可以看出用的TypeScript版本较新而项目中vue/tsconfig中包含了一些已弃用或移除的编译器选项{ extends: vue/tsconfig/tsconfig.web.json, include: [env.d.ts, src/**/*, src/**/*.vue], compilerOptions: { paths: { /*: [./src/*] } }, references: [ { path: ./tsconfig.config.json } ] }3、解决方案看到版本问题我直接就先更新 tsconfignpm update vue/tsconfig更新后发现还是报红重启VS Code后发现正常了已解决