module.exports = { content: [ './pages/**/*.{html,js}' './components/**/*.{html,js}', ], safelist: [ 'bg-red-500', 'text-3xl', 'lg:text-4xl', ] // ... }

How to Add Dynamic Generated Classes in Tailwind CSS Without Purge
2.8K
2 years ago
0 comments
To whitelist/safelist you can make use of safelist in the configuration "tailwind.config.js". Now when you compile your tailwind but you didn't use the classes it will still present in the compiled CSS file as it's within the "safelist".
Topics:
Frontend
Resource
Average
Average
Support Us
If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️
Leave a reply