Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to use purgecss on php files?

I have a project where I'm not using any framework or template engine, just plain php. I came across this PurgeCSS plugin that I would like to try as all the pages in the project follow a very similar theme and I think are not using much css rules from the Bootstrap CSS that I have included.

like image 989
Akash Sarode Avatar asked Dec 05 '25 08:12

Akash Sarode


1 Answers

My bad, I didn't try it before posting this question. On their website it says it can work with blade files but I realized blade files are written in PHP after all and I tried purgecss CLI on my project, It worked and my bootstrap.min.css is now 40KB which was 153KB before.

like image 91
Akash Sarode Avatar answered Dec 07 '25 22:12

Akash Sarode



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!