jd-solanki / anu

Anu - DX focused utility based vue component library built on top of UnoCSS & VueUse ⚡️🔥

Home Page:https://anu-vue.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

hongquan opened this issue · comments

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

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?

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).

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

commented

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.

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

I have the same problem.