snipette-wripro-site/postcss.config.js

22 lines
567 B
JavaScript
Raw Normal View History

2020-04-06 12:18:34 -04:00
const purgecss = require('@fullhuman/postcss-purgecss')
const cssnano = require('cssnano')
module.exports = {
plugins: [
require('postcss-import'),
require('tailwindcss'),
process.env.NODE_ENV === 'production' ? require('autoprefixer') : null,
process.env.NODE_ENV === 'production'
? cssnano({
preset: 'default'
})
: null,
process.env.NODE_ENV === 'production'
? purgecss({
content: ['./src/*.htm'],
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || []
})
:null,
]
}