jd-solanki / anu

Anu - DX focused utility based vue component library built on top of UnoCSS & VueUse ⚡️🔥
https://anu-vue.netlify.app/
MIT License
1.03k stars 56 forks source link

Error: Argument of type '{}' is not assignable to parameter #199

Open hongquan opened 11 months ago

hongquan commented 11 months ago

I create a project with command

$ yarn create vite

then start to integrate anu, following this, but I got this error regarding to anu components:

image

jd-solanki commented 11 months ago

Are getting this error if you clone anu-demo under my account.

Can you please provide minimal reproducible example so I can take a look?

hongquan commented 11 months ago

Hi, this is the reproducible example: https://bitbucket.org/hongquan/anu-ts-error/ In this example, I set registerComponents to false and do import ABtn manually (in HelloWorld.vue component).

hongquan commented 11 months ago

Note, the vite build run successfully if I remove registerComponents option, and remove the import { ABtn } from 'anu-vue' line. But then Volar failed to infer the type of component. image

euwei7 commented 11 months ago

Are getting this error if you clone anu-demo under my account.

Can you please provide minimal reproducible example so I can take a look?

I also have this issue, and tree shaking is not working.

jd-solanki commented 11 months ago

Thanks for reporting, I can reproduce this at my end.

QC2168 commented 5 months ago

I have the same problem.