Replies: 1 comment 2 replies
-
Hey @kimgiutae! 👋 You're right that this only matters when tailwind-merge ends up in the client bundle. I don't want to assume too much about the context in which tailwind-merge is used though. E.g. if someone is new to programming and just uses tailwind-merge in a vanilla JS app, talking about RSC in the tailwind-merge docs would be confusing. I think it's better to rely on devs to learn about client/server bundles in the docs of the framework that deals with these bundles, like in the Next.js docs. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. As the docs explains in "When and how to use it":
"Increases bundle size: tailwind-merge relies on a large config (~5 kB out of the ~7 kB minified and gzipped bundle size) to understand which classes are conflicting. This might be limiting if you have tight bundle size constraints." (https://github.com/dcastil/tailwind-merge/blob/v2.5.5/docs/when-and-how-to-use-it.md#increases-bundle-size)
But I don't think this explanation is correct, at least incomplete.
As the way react frameworks works now (as recommended). The client bundle size may increase ONLY if calling the lib in a CLIENT component. Using in the default RSC should not affect performance at all.
I'm wrong?
Beta Was this translation helpful? Give feedback.
All reactions