zguolee/starter-uni

组件的ts类型定义缺失

Closed this issue · 2 comments

我用了你这一套初始化模板,有一个问题就是我不要用uniapp的easycom,想用unplugin-vue-component。因为我需要组件的类型定义。

但是我填加了unplugin-vue-component的配置后,还是没法读取组件的类型。

不知道你有没有试过同类型的问题?

之前使用过unplugin-vue-component,同样无法读取组件类型,估计需要UniApp来解决了。

如果你使用 pnpm,请在项目根目录创建一个 .npmrc 文件, see issue.

// .npmrc
public-hoist-pattern[]=@vue*
// or 
// shamefully-hoist = true

当然也可以使用@uni-helper/vite-plugin-uni-components