Why doesn't my bundler seem to be resolving class-variance-authority/types correctly?
#350
AlexFrazer
started this conversation in
General
Replies: 1 comment
-
|
Have you tried |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So, I have a basic component roughly like so:
I noticed, when I went to compile it, it created something like this:
However, the types consistently seemed to resolve to "any" for just about anything I accessed on
ButtonProps. Digging into it, I foundimport('class-variance-authority/types')wasn't actually pointing to anything, for some reasonThis seemed a bit odd to me, because you guys definitely do mark it as an export.
I found that if I replaced the path with
'class-variance-authority/dist/types', it worked just fine. I was able to fix this by adding this alias to my owntsconfig.jsonHowever, something just feels "off" about this. Am I doing something obviously wrong here?
Beta Was this translation helpful? Give feedback.
All reactions