Safelisting - Does It Work? #715
Unanswered
peter-hvass
asked this question in
Q&A
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. |
2 replies
|
I tried your configuration in this repository: https://github.com/Ffloriel/purgecss-reproduction/tree/715 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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;
All reactions