Error: with Webpack 5 and tailwind due to default import of clsx library #184
-
Hi Joe, I am implementing a React application with shadcnui (https://ui.shadcn.com/), tailwindcss, clsx (1.2.1) class-variance-authority (0.6.1) and bundling the app using Webpack 5 (5.4.0). I am using clsx to merge tailwind class below is the code snap... import { clsx } from "clsx"; export function cn(...inputs) { And I noticed class-variance-authority is also using clsx. When I am trying to run my project I am getting the error cx is not a function in node_module/class-variance-authority/index.mjs. I tried several ways and googled this error but no luck. I need your support to fix this issue. Thank you in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@joe-bell Could you please help me on this |
Beta Was this translation helpful? Give feedback.
Try https://github.com/joe-bell/cva/releases/tag/v0.7.0