Mark autoprefixer and cssnano as "production-only"

This commit is contained in:
Hippo 2020-04-06 22:07:34 +05:30
parent 0de6ba78f3
commit aa335adb2b

View file

@ -4,10 +4,12 @@ const cssnano = require('cssnano')
module.exports = {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
cssnano({
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) || []