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 = { module.exports = {
plugins: [ plugins: [
require('tailwindcss'), require('tailwindcss'),
require('autoprefixer'), process.env.NODE_ENV === 'production' ? require('autoprefixer') : null,
cssnano({ process.env.NODE_ENV === 'production'
? cssnano({
preset: 'default' preset: 'default'
}), })
: null,
purgecss({ purgecss({
content: ['./src/*.htm'], content: ['./src/*.htm'],
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [] defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || []