Safelisting - Does It Work? #715
Replies: 2 comments 2 replies
-
Im having the exact same problem with mine. In my case it was react-boostrap that I wasn't able to exclude from purging (forcing me to use just regular bootstrap) and another library called react-multi-carousel. I tried greedy safelisting with regex on anything that starts with react as react-multi-carousel used that for its styling naming.
|
Beta Was this translation helpful? Give feedback.
-
I tried your configuration in this repository: https://github.com/Ffloriel/purgecss-reproduction/tree/715 |
Beta Was this translation helpful? Give feedback.
-
I've been messing around with purgecss for a couple hours here or there and I simply can't get it to safelist certain selectors.
Have tried regex in each of the different sub-categories (greedy, etc.) and have also tried in-line in the css itself. I've also tried just sticking super obvious div elements in my content carrying the classnames I want to preserve. Nada. Purgecss merrily excludes it all.
Does this feature actually work for any of you out there? Am I just doing something incredibly stupid?
In my below example btn-with-price gets safelisted correctly... navbar-phone never does.
Config;
Obvious divs;
The raw css that never makes the cut;
Beta Was this translation helpful? Give feedback.
All reactions