Tree shaking and bloat are different concerns. And, technically, is tailwind tree shaking? I thought they only built styles that the compiler could find being used rather than removing styles the compiler couldn't find being used.
Tailwind v4 tree shakes automatically on imports is what I understand.
I don't think it's identical to package tree shaking but the outcome is the same.
I don't think it was doing it before v4, or if it was, not as efficiently
Tree shaking is actually a sign of bloat. It is a tool on top of a bloated mess, to fix that mess. It would be better not to make a mess in the first place.
Tree-shaking really only works for languages that are designed to be tree-shakable, which no web language is.
Type/JavaScript are extremely tree shakable if using esm.. what makes you think it's not?
Only at the most crude level. Ever heard of "virtual functions"?
Runtime polymorphism is great but I wouldn't consider that to be tree shaking.