You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @dcastil, another approach that wouldn't require help from the tailwind team would be to break up the default config into core plugins. Right now the default config is all or nothing, you either get all the classGroups from the default with extendTailwindMerge or start from scratch with createTailwindMerge. Since tailwind-merge already supports merging configs, would it be feasible to export configs representing all the tailwind core plugins separately? Then users could specify a subset of commonly overridden plugins to reduce their bundle size.
It's common to override things like height, width, color, and some of the flex and grid properties. I would think it's less common to want to override properties like backdrop. The only issue would be if consumers get confused on which classes twMerge supports, though if they're using any tailwind plugins that's potentially already an issue.
I think the best path forward with this is to keep the library exports twMerge and getDefaultConfig untouched (you get the full config there as expected, no breaking change) and add additional exports for people who choose to limit merging for reduced bundle size.
Originally posted by @Rinaldo in #185 (reply in thread)
The text was updated successfully, but these errors were encountered: