Add cssnano and purgecss
This commit is contained in:
parent
ed8523ad0c
commit
0de6ba78f3
3 changed files with 952 additions and 17 deletions
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@fullhuman/postcss-purgecss": "^2.1.0",
|
||||||
"autoprefixer": "^9.7.5",
|
"autoprefixer": "^9.7.5",
|
||||||
|
"cssnano": "^4.1.10",
|
||||||
"tailwindcss": "^1.2.0",
|
"tailwindcss": "^1.2.0",
|
||||||
"watch": "^1.0.2"
|
"watch": "^1.0.2"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,16 @@
|
||||||
|
const purgecss = require('@fullhuman/postcss-purgecss')
|
||||||
|
const cssnano = require('cssnano')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: [
|
plugins: [
|
||||||
require('tailwindcss'),
|
require('tailwindcss'),
|
||||||
|
require('autoprefixer'),
|
||||||
|
cssnano({
|
||||||
|
preset: 'default'
|
||||||
|
}),
|
||||||
|
purgecss({
|
||||||
|
content: ['./src/*.htm'],
|
||||||
|
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || []
|
||||||
|
})
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue