Add cssnano and purgecss

This commit is contained in:
Hippo 2020-04-06 21:48:34 +05:30
parent ed8523ad0c
commit 0de6ba78f3
3 changed files with 952 additions and 17 deletions

View file

@ -1,6 +1,8 @@
{
"dependencies": {
"@fullhuman/postcss-purgecss": "^2.1.0",
"autoprefixer": "^9.7.5",
"cssnano": "^4.1.10",
"tailwindcss": "^1.2.0",
"watch": "^1.0.2"
},

View file

@ -1,5 +1,16 @@
const purgecss = require('@fullhuman/postcss-purgecss')
const cssnano = require('cssnano')
module.exports = {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
cssnano({
preset: 'default'
}),
purgecss({
content: ['./src/*.htm'],
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || []
})
]
}

956
yarn.lock

File diff suppressed because it is too large Load diff