Documentation for purgecss-from-pug
Thanks for this plugin first of all. I have used purgecss to remove a lot of redundant css from Bootstrap and Fontawesome. My project is written with pug and saw that there is a repo for 'purgecss-from-pug' but the documentation is a little sparse. I am wondering if this module can squeeze down my css even further but unsure how to integrate this with my webpack setup (or indeed, if it is even necessary/possible). Currently "Coverage" in Chrome Dev Tools reports unsued bytes of 55% (down from 95%) but am hoping this can be reduced even further.
There's only a limited documentation about extractors at the moment on this page: https://purgecss.com/extractors.html#using-an-extractor The idea is to use it like a custom extractor, purgecss-from-pug should be used like:
import purgePug from 'purgecss-from-pug'
const options = {
content: [], // files to extract the selectors from
css: [], // css
extractors: [
{
extractor: purgePug,
extensions: ['pug']
},
]
}