ui icon indicating copy to clipboard operation
ui copied to clipboard

Why shadcn-ui installs tailwind-merge and tailwindcss-animate as production dependencies?

Open tjhoo opened this issue 1 year ago • 1 comments

Hi, shadcn-ui installed the following packages as the production dependencies,

"dependencies": {
  "class-variance-authority": "^0.7.0",
  "clsx": "^2.0.0",
  "lucide-react": "^0.284.0",
  "tailwind-merge": "^1.14.0",
  "tailwindcss-animate": "^1.0.7"
}

Yes, clsx and lucide-react (and maybe class-variance-authority) are production dependencies.

Do you know what are the reasons tailwind-merge and tailwindcss-animate are NOT installed as development dependencies?

tjhoo avatar Oct 10 '23 01:10 tjhoo

tailwind-merge needs to be shipped to client (i.e, the user's browser) to resolve conflicting classes. You cannot predict during build time which classes should be merged/removed on the client when the state changes. As far as tailwind-animate goes, I don't think it needs to be installed as production dep as it'll create classes during build time.

schardev avatar Oct 11 '23 15:10 schardev

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

shadcn avatar Feb 23 '24 23:02 shadcn