4
0
forked from crowetic/commerce

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

@ -48,7 +48,6 @@
"tailwindcss": "^1.9" "tailwindcss": "^1.9"
}, },
"devDependencies": { "devDependencies": {
"@fullhuman/postcss-purgecss": "^3.0.0",
"@graphql-codegen/cli": "^1.17.10", "@graphql-codegen/cli": "^1.17.10",
"@graphql-codegen/schema-ast": "^1.17.8", "@graphql-codegen/schema-ast": "^1.17.8",
"@graphql-codegen/typescript": "^1.17.10", "@graphql-codegen/typescript": "^1.17.10",

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)
},
},
],
], ],
} }

View File

@ -1,6 +1,9 @@
module.exports = { module.exports = {
future: { purge: {
removeDeprecatedGapUtilities: true, content: [
'./pages/**/*.{js,ts,jsx,tsx}',
'./components/**/*.{js,ts,jsx,tsx}',
],
}, },
theme: { theme: {
extend: { extend: {
@ -47,9 +50,5 @@ module.exports = {
}, },
}, },
}, },
variants: {},
plugins: [require('@tailwindcss/ui')], plugins: [require('@tailwindcss/ui')],
experimental: {
applyComplexClasses: true,
},
} }