-
Notifications
You must be signed in to change notification settings - Fork 21
/
postcss.config.js
33 lines (31 loc) · 911 Bytes
/
postcss.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const cssnano = require('cssnano');
const postcss_color_mod = require('postcss-color-mod-function');
const postcss_preset_env = require('postcss-preset-env');
const postcss_Import = require('postcss-import');
const postcss_Url = require('postcss-url');
const purgecss = require('@fullhuman/postcss-purgecss');
const production = !process.env.ROLLUP_WATCH;
module.exports = {
plugins: [
postcss_Import(),
postcss_Url(),
require('tailwindcss'),
postcss_preset_env({
stage: 0,
autoprefixer: {
grid: true,
},
}),
postcss_color_mod(),
cssnano({
autoprefixer: false,
preset: ['default'],
}),
production &&
purgecss({
content: ['./**/*.html', './**/*.svelte'],
defaultExtractor: content =>
content.match(/[A-Za-z0-9-_:/]+/g) || [],
}),
],
};