send/postcss.config.js

30 lines
581 B
JavaScript
Raw Normal View History

2018-10-25 23:49:22 +00:00
class TailwindExtractor {
static extract(content) {
return content.match(/[A-Za-z0-9-_:/]+/g) || [];
}
2018-10-25 23:49:22 +00:00
}
const options = {
plugins: [
require('tailwindcss')('./tailwind.js'),
require('@fullhuman/postcss-purgecss')({
content: ['./app/*.js', './app/ui/*.js'],
extractors: [
{
extractor: TailwindExtractor,
extensions: ['js']
}
]
}),
require('cssnano')({
preset: 'default'
})
]
2017-08-04 00:07:40 +00:00
};
if (process.env.NODE_ENV === 'development') {
2017-08-04 00:07:40 +00:00
options.map = { inline: true };
}
module.exports = options;