Removes classes that are dynamically created
MrToph opened this issue · comments
Christoph Michel commented
Hi, in my code I use some classes like this:
<li className={`cols-${headers.length}`}>Hello</li>
which I defined for cols-1
, cols-2
, ..., cols-5
.
Purgecss cannot infer this and removes all of these classes from the output.
I'm not sure how purgecss works internally and how feasible it is to detect classes that depend on JS variables.
Christoph Michel commented
Wrong repo, I found what I was looking for in the real one
Sorry