Usage with CSS Modules
Hello @manniL how can we use PurgeCSS with CSS Modules? It doesn't remove unused classes. Thank you!
this plugins purge well the css modules, but, the base config of purgecss does not remove unused keyframes/fonts and variables , if you add this to the nuxt config.
export default {
...
purgeCSS: {
keyframes: true,
variables: true,
fontFace: true,
},
...
}
you have a global purge of all your style.
https://purgecss.com/configuration.html#options
with animate.css is work well when using only one animation , all unused class and keyframes is removed.
Sadly, PurgecSS + CSS Modules is not as straightforward. I don't plan support for it in near future.
See https://github.com/FullHuman/purgecss/issues/163#issuecomment-526607181 for hints regarding a custom solution