Skip to content

How to use with PurgeCSS #53

Locked Answered by GrimLink
GrimLink asked this question in Q&A
Discussion options

You must be logged in to vote

From our guides page: https://fylgja.dev/guides/postcss/#purgecss

Fylgja works really wel with PurgeCSS. And almost does not needed any config to work with Fylgja.

Sadly PurgeCSS does remove any pseudo states without any prefixes. So things like :any-link will get removed.

To avoid this simply make sure the add the following regex to your safelist.

require("@fullhuman/postcss-purgecss")({
    safelist: [/^\:/]
})

Replies: 1 comment

Comment options

GrimLink
Mar 30, 2022
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by GrimLink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant