tailwind tree shakes 'lg:' prefixed classnames added through a plugin even if added to safelist with a regex #10241
-
|
What version of Tailwind CSS are you using? What build tool (or framework if it abstracts the build tool) are you using? What version of Node.js are you using? What browser are you using? What operating system are you using? Reproduction URL Describe your issue while the safelist pattern ensures that the utility class is available even if the ultimate className used in react is dynamically constructed, tailwind still treeshakes it's 'lg:' variant. Expected behavior: specifying pattern /nextgen/ should prevent both Current behavior: only |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hey! See the docs, how this works is all explained there: https://tailwindcss.com/docs/content-configuration#using-regular-expressions
Here's a demo of it working with your code: |
Beta Was this translation helpful? Give feedback.
-
|
Thankyou so much!! |
Beta Was this translation helpful? Give feedback.
Hey! See the docs, how this works is all explained there:
https://tailwindcss.com/docs/content-configuration#using-regular-expressions
Here's a demo of it working with your code:
https://play.tailwindcss.com/jFCWmzSAXK?file=config