mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Trying new purge
This commit is contained in:
@@ -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)
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
||||
|
Reference in New Issue
Block a user