-
I have a simple file containing a import { cva } from 'class-variance-authority';
export const button = cva(
'button',
{
variants: {
variant: {
primary: 'primary',
secondary: 'secondary',
link: 'link',
'link-light': 'link-light',
},
size: {
large: 'inline-block px-6 py-4',
small: 'inline-block px-4 py-3',
inline: 'inline',
},
},
},
); After updating to 0.5.2, this gives me ts error 2742: |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
Can you provide a working reproduction please? I can see that cc @msonnberger |
Beta Was this translation helpful? Give feedback.
-
@Alxandr, make sure that |
Beta Was this translation helpful? Give feedback.
-
To me what happened was exactly like #190, but after updating |
Beta Was this translation helpful? Give feedback.
-
I'm also experiencing #190 but setting In the consuming code, all CVA types appear as generic What does seem to work for me is to change the path in the built import("class-variance-authority/types").ClassProp // Current build result, does not work
import("class-variance-authority/dist/types").ClassProp // Seems to be working This s kind of the opposite of what this issue describes 🤔 I'm building a UI library based on ShadCN UI for use in various Next.JS app router apps and I could manually adjust those paths in the libs build process but that would be very hacky. Is there anything else I could do on my end to solve this issue? Thanks! FYI, I'm on the latest |
Beta Was this translation helpful? Give feedback.
-
Should be fixed in |
Beta Was this translation helpful? Give feedback.
Should be fixed in
v1.0.0-beta.3
(which now exports/types
)