Last updated on September 1, 2021
After hours of wondering why my CSS was still being purged even though it was inside /* purge start ignore */
and /* purgecss end ignore /*
, I discovered a simple answer on Github that I wanted to share.
Add !
so your ignore comments look like this:
/*! purgecss start ignore */
/*! purgecss end ignore */
This removes any comments in and around rules, selectors & declarations. But comments marked with !
are kept by default.
Happy purging!
Articles, guides and interviews about web development and career progression.
Max 1-2x times per month.