I have the "full" 3.9 MB Tailwind CSS file and successfully applied PurgeCSS to reduce it to 9 kB. But it also purged all responsive classes like md:px-6
, they don't show up in my purged version.
Note: this question is for using the command line interface (CLI)
This is what I did:
purgecss --css ~/Desktop/Projects/Flask/Project1/build/static/css/main.css --content ~/Desktop/Projects/Flask//Project1/build/**/*.html --output ~/Desktop/Projects/Flask/Project2/static/css/main.css
I chose to create the output file in a different folder (Project2
) so that I could check on the input vs output.
One thing I tried is to add --safelist [/md/]
, but didn't help. In fact the safelist didn't seem to be used at all...
(I use CLI since it is part of a bigger Python Flask project)