Whitelisting no longer works in Tailwind Options
See original GitHub issueWhat worked in prior builds of Nuxt and TailwindCSS in the purgeCSS key in nuxt.config.js
:
whitelist: ['tip', 'warning', 'expert'],
whitelistPatternsChildren: [/content.$/]
No longer works in the updated built-in options key for Tailwind:
purge: {
options: {
whitelist: ['tip', 'warning', 'expert'],
whitelistPatternsChildren: [/content.$/]
}
}
The only thing that does work is to set enabled: false
(contrary to this issue)–but then CSS is not purged.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:22 (2 by maintainers)
Top Results From Across the Web
Whitelisting no longer works in Tailwind Options #124 - GitHub
I had to move them to my layout file. Oddly enough, if I had a placeholder style in my layout, THEN the style...
Read more >TailwindCSS / PurgeCSS whitelist not working - Stack Overflow
Tried various solutions I found, but nothing seem to do the trick, it keeps purging the classes I add to the whitelist. Any...
Read more >Content Configuration - Tailwind CSS
The blocklist option only affects CSS that would be generated by Tailwind, not custom CSS you've authored yourself or are importing from another...
Read more >Sage 10: Whitelist Tailwindcss classes on Purge
How is best to setup Sage 10 to whitelist Tailwind classes on Purge, I have tried adding the following to tailwind.config.js, but it...
Read more >gatsby-plugin-purgecss
Define options in gatsby-config.js , not purgecss.config.js . If using tailwindcss, use the tailwind: true option. Use printRejected ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not sure if this is the source of the problem, but I just noticed that PurgeCSS changed their
blacklist
andwhitelist
options tosafelist
andblocklist
.https://purgecss.com/configuration.html
I just confimed t works if you use
options
andsafelist
: