Configuration
Configuration file
module.exports = {
content: ['index.html'],
css: ['style.css']
}const purgecss = new Purgecss()
// or use the path to the file as the only parameter
const purgecss = new Purgecss('./purgecss.config.js')Options
{
content: Array<string | RawContent>,
css: Array<string | RawContent>,
extractors?: Array<ExtractorsObj>,
whitelist?: Array<string>,
whitelistPatterns?: Array<RegExp>,
whitelistPatternsChildren?: Array<RegExp>,
keyframes?: boolean,
fontFace?: boolean,
rejected?: boolean
}Last updated