XHY VUE 基础组件库
在引入的项目根目录创建文件
shims-vue.d.ts
declare module '*.vue' {
import { ComponentOptions } from 'vue'
const componentOptions: ComponentOptions
export default componentOptions
}
解决报错: Cannot find module 'xxx.vue' or its corresponding type declarations.ts(2307)。
报错原因:typescript 只能理解 .ts 文件,无法理解 .vue文件