wangyu-personal
Results
1
comments of
wangyu-personal
问题出现在自动生成的 components.d.ts 文件中的 `declare module '@vue/runtime-core'` 声明,在 pnpm 中只能访问项目的顶级依赖,而 @vue/runtime-core 是 vue 模块下的依赖,不是顶级依赖,导致声明语句失效。(yarn 和 npm 的 node_modules 平铺目录结构允许访问所有依赖) 解决方案如下: 1. Volar 同时也读取了 vue 模块中的 GlobalComponents 类型,如果你愿意手动维护 components.d.ts 文件,直接将声明改成 `declare module...