Trying new purge

This commit is contained in:
Belen Curcio
2020-10-26 10:31:44 -03:00
parent 4ff7887771
commit 876cadf8b8
3 changed files with 5 additions and 25 deletions

View File

@@ -15,23 +15,5 @@ module.exports = {
},
},
],
[
'@fullhuman/postcss-purgecss',
{
content: ['./pages/**/*.{tsx}', './components/**/*.{tsx}'],
// This is the function used to extract class names from your templates
defaultExtractor: (content) => {
// Capture as liberally as possible, including things like `h-(screen-1.5)`
const broadMatches = content.match(/[^<>"'`\s]*[^<>"'`\s:]/g) || []
// Capture classes within other delimiters like .block(class="w-1/2") in Pug
const innerMatches =
content.match(/[^<>"'`\s.()]*[^<>"'`\s.():]/g) || []
return broadMatches.concat(innerMatches)
},
},
],
],
}