2020-09-30 11:44:38 -05:00
|
|
|
module.exports = {
|
|
|
|
plugins: [
|
2020-10-01 20:40:40 -05:00
|
|
|
'tailwindcss',
|
2020-10-02 12:59:50 -03:00
|
|
|
'postcss-nesting',
|
2020-10-01 20:40:40 -05:00
|
|
|
'postcss-flexbugs-fixes',
|
2020-09-30 11:44:38 -05:00
|
|
|
[
|
2020-10-01 20:40:40 -05:00
|
|
|
'postcss-preset-env',
|
2020-09-30 11:44:38 -05:00
|
|
|
{
|
|
|
|
autoprefixer: {
|
2020-10-01 20:40:40 -05:00
|
|
|
flexbox: 'no-2009',
|
2020-09-30 11:44:38 -05:00
|
|
|
},
|
|
|
|
stage: 3,
|
|
|
|
features: {
|
2020-10-01 20:40:40 -05:00
|
|
|
'custom-properties': false,
|
2020-09-30 11:44:38 -05:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2020-10-26 10:26:04 -03:00
|
|
|
[
|
|
|
|
'@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)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2020-09-30 11:44:38 -05:00
|
|
|
],
|
2020-10-01 20:40:40 -05:00
|
|
|
}
|