forked from timvisee/send
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostcss.config.js
More file actions
38 lines (35 loc) · 750 Bytes
/
postcss.config.js
File metadata and controls
38 lines (35 loc) · 750 Bytes
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
const TailwindExtractor = content => {
return content.match(/[A-Za-z0-9-_:/]+/g) || [];
};
const options = {
plugins: [
require('tailwindcss')('./tailwind.config.js'),
require('postcss-preset-env')
]
};
if (process.env.NODE_ENV === 'development') {
options.map = { inline: true };
} else {
options.plugins.push(
require('@fullhuman/postcss-purgecss')({
content: [
'./app/*.js',
'./app/ui/*.js',
'./android/*.js',
'./android/pages/*.js'
],
extractors: [
{
extractor: TailwindExtractor,
extensions: ['js']
}
]
})
);
options.plugins.push(
require('cssnano')({
preset: 'default'
})
);
}
module.exports = options;