mirror of
https://github.com/vercel/commerce.git
synced 2025-03-15 23:12:32 +00:00
38 lines
989 B
JavaScript
38 lines
989 B
JavaScript
module.exports = {
|
|
plugins: [
|
|
'tailwindcss',
|
|
'postcss-nesting',
|
|
'postcss-flexbugs-fixes',
|
|
[
|
|
'postcss-preset-env',
|
|
{
|
|
autoprefixer: {
|
|
flexbox: 'no-2009',
|
|
},
|
|
stage: 3,
|
|
features: {
|
|
'custom-properties': false,
|
|
},
|
|
},
|
|
],
|
|
[
|
|
'@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)
|
|
},
|
|
},
|
|
],
|
|
],
|
|
}
|