snipette-datpro-site/postcss.config.js
Badri Sunderarajan 4194231444 @import all styles to style.css
Let's modularise our CSS and @import it all to one place!
2020-04-10 16:05:34 +05:30

19 lines
502 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,
purgecss({
content: ['./src/*.htm'],
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || []
})
]
}