Remove unused CSS with Purgecss

Share this video with your friends

Send Tweet

Out of the box, tailwind generates a lot of css. For example, every background color, text color, and border color needs an object generated for it with each gradient available. In addition, more classes need to be generated for each breakpoint defined within tailwind as well as any variant that is available. Thousands and thousands of utility classes are generated.

Learn how Purgecss can remove all unused classes in your project.

Ronald Rey
Ronald Rey
~ 5 years ago

What tool did you use to output the size of the CSS file like that?

Jan
Jan
~ 5 years ago

i think the right one ist https://marketplace.visualstudio.com/items?itemName=mkxml.vscode-filesize.