diff options
| author | Jfriedli | 2021-03-21 15:56:23 +0100 |
|---|---|---|
| committer | Jfriedli | 2021-03-21 15:56:23 +0100 |
| commit | 524e055e8cdea4bab3e2ad19dc5c439e768c253a (patch) | |
| tree | c6669829ee4e15d832869c301192013afc5af522 /postcss.config.js | |
| parent | 8bb860a865df803ac992663454928e65b5b5036c (diff) | |
purge and nanoify
Diffstat (limited to 'postcss.config.js')
| -rw-r--r-- | postcss.config.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/postcss.config.js b/postcss.config.js index 29569d9..2e924c5 100644 --- a/postcss.config.js +++ b/postcss.config.js | |||
| @@ -1,9 +1,11 @@ | |||
| 1 | const path = require('path'); | 1 | const path = require('path'); |
| 2 | const cssnano = require('cssnano') | ||
| 2 | 3 | ||
| 3 | module.exports = (ctx) => ({ | 4 | module.exports = (ctx) => ({ |
| 4 | plugins: [ | 5 | plugins: [ |
| 5 | require('tailwindcss')(path.resolve(__dirname, 'tailwind.config.js')), | 6 | require('tailwindcss')(path.resolve(__dirname, 'tailwind.config.js')), |
| 6 | require('autoprefixer'), | 7 | require('autoprefixer'), |
| 8 | process.env.NODE_ENV === 'production' ? cssnano({ preset: 'default' }) : null, | ||
| 7 | ctx.env === 'production' && require('@fullhuman/postcss-purgecss')({ | 9 | ctx.env === 'production' && require('@fullhuman/postcss-purgecss')({ |
| 8 | content: [ | 10 | content: [ |
| 9 | path.resolve(__dirname, 'templates/**/*.html') | 11 | path.resolve(__dirname, 'templates/**/*.html') |
