-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safelist option doesn't work ? #312
Comments
Could you provide a reproduction please? |
@Atinux you didn't have access to the codesandbox reproduction link ? |
You're using JIT which doesn't support it yet |
Thx @web2033 but |
I think with JIT it works in reverse. It's not purging now but creating classes on the fly. |
Ok, to solved the problem I have created a fake component with all the classes I want to safe which I called on the content array and its worked but it's not pretty |
@web2033 "Advanced PurgeCSS options like safelist aren't supported yet since we aren't actually using PurgeCSS. We'll add a way to safelist classes for sure though. For now, a safelist.txt file somewhere in your project with all the classes you want to safelist will work fine." it works? |
Create a // Safelist.txt
md:w-1/2
md:w-6/12
... Call the file on the content section of the purge purge: {
content: [
'./safelist.txt',
],
}, |
is there another way to add safelist without add some fake file like |
Version
@nuxtjs/tailwindcss: ^4.0.1
nuxt: 2.15.3
Reproduction Link
https://codesandbox.io/s/elegant-tu-xipm4
Steps to reproduce
purge: { options: { safelist: [] } }
doesn't workWhat is Expected?
What is actually happening?
The text was updated successfully, but these errors were encountered: