FullHuman / postcss-purgecss

PostCSS plugin for purgecss

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Removes classes that are dynamically created

MrToph opened this issue · comments

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.

Wrong repo, I found what I was looking for in the real one 😄
Sorry