-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
postcss.config.js
44 lines (41 loc) · 947 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
34
35
36
37
38
39
40
41
42
43
44
const extractor = require('smelte/src/utils/css-extractor.js');
const tailwindConfig = require('./tailwind.config.js');
const safelistSelectors = [
'html',
'body',
'stroke-primary',
'mode-dark',
// Components with custom color prop might need its color to be whitelisted too
'bg-blue-500',
'hover:bg-blue-400'
];
const safelistPatterns = [
// for JS ripple
/ripple/,
// date picker
/w-.\/7/,
// I'm guessing it doesn't correlate p-2.5 with p-2\.5
/^[mphw]\w?-\d\.5$/
];
module.exports = {
plugins: {
'postcss-import': {},
'postcss-url': {},
'postcss-input-range': {},
tailwindcss: tailwindConfig,
autoprefixer: {},
'@fullhuman/postcss-purgecss': {
content: ['./**/*.svelte'],
extractors: [
{
extractor,
extensions: ['svelte']
}
],
safelist: {
standard: safelistSelectors,
deep: safelistPatterns
}
}
}
};