Replies: 2 comments 2 replies
-
A workaround could be to list all classes in a unused file and source it like so: @source "./safelist.css"; |
Beta Was this translation helpful? Give feedback.
1 reply
-
@ic-768 Our solve for this was to create a JS file that creates all the safelist classes and outputs them into a txt file that is in our theme code that tailwind watches during our build process. Not ideal but it works better then typing out all the permutations. Used an array to mimic the pattern style. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My company's app has an integrated component library, that creates classes programmatically, like so:
We used to be able to safelist all of these, by providing a regex pattern to safelist, e.g.:
Now with the safelist not supported in v4, the only solution I can find for cases like these is manually inputting all the classes in a text file so that they can be parsed. Needless to say, I'd rather not do that.
Is there any other solutions for cases like this?
Beta Was this translation helpful? Give feedback.
All reactions