Skip to content

Tailwind v4: Unused CSS classes not being purged during production build for @layer components classes #17526

Answered by philipp-spiess
TheNinza asked this question in Help
Discussion options

You must be logged in to vote

Hey! @layer components in v4 means something different than it did in v3. You can read more about it in our upgrade guide: https://tailwindcss.com/docs/upgrade-guide#adding-custom-utilities

If you want to register a custom utility that is purged, you'll need to use @utility in v4 👍

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@TheNinza
Comment options

Answer selected by TheNinza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants