snipette-datpro-site/postcss.config.js
2020-04-10 16:15:10 +05:30

21 lines
567 B
JavaScript

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