Home > Software design >  Does Tailwind CSS remove unused custom CSS classes in production?
Does Tailwind CSS remove unused custom CSS classes in production?

Time:11-22

I have read Tailwind CSS: Optimizing for Production. So far what I have understood that

Tailwind CSS removes unused CSS from your production builds for maximum performance

My question is what about the external CSS files? Are those custom CSS classes will be removed on production?

CodePudding user response:

TW does not access your external CSS files. From the docs you linked to:

Removing all unused styles By default, Tailwind will only remove unused classes that it generates itself, or has been explicitly wrapped in a @layer directive. It will not remove unused styles from third-party CSS you pull in to your project, like a datepicker library you pull in for example.

  • Related