forked from asyncapi/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostcss.config.js
More file actions
37 lines (37 loc) · 818 Bytes
/
postcss.config.js
File metadata and controls
37 lines (37 loc) · 818 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
const purgecss = [
"@fullhuman/postcss-purgecss",
{
content: ["./components/**/*.*", "./pages/**/*.*"],
whitelistPatterns: [
/left-/,
/mr-/,
/pl-/,
/px-/,
/py-/,
/z-/,
/(md|lg|xl):mb-/,
/(md|lg|xl):text-xs$/,
/(md|lg|xl):text-gray-/,
/(md|lg|xl):font-/,
/(md|lg|xl):block$/,
/(md|lg|xl):hidden$/,
/(md|lg|xl):cursor-/,
/(md|lg|xl):flex/,
/^xl:max-w-184$/,
/asyncapi\-[\w]+/,
/generator\-[\w]+/,
/w\-2\.5/,
/h\-2\.5/,
],
defaultExtractor: content => content.match(/[\w-/:()]+(?<!:)/g) || []
}
];
module.exports = {
plugins: [
"postcss-import",
"@zeit/next-css",
"tailwindcss",
"autoprefixer",
...(process.env.NODE_ENV === "production" ? [purgecss] : [])
]
};