-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpostcss.config.js
More file actions
30 lines (26 loc) · 840 Bytes
/
postcss.config.js
File metadata and controls
30 lines (26 loc) · 840 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
const tailwindcss = require('tailwindcss');
const cssnano = require('cssnano')
const purgecss = require('@fullhuman/postcss-purgecss')({
// Specify the paths to all of the template files in your project
content: [
"./src/**/*.html",
"./src/**/*.js",
],
// Include any special characters you're using in this regular expression
defaultExtractor: content => content.match(/[\w-/.:]+(?<!:)/g) || []
})
module.exports = {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
...process.env.NODE_ENV === 'production'
? [purgecss]
: [],
process.env.NODE_ENV === 'production'
? cssnano({ preset: 'default' })
: null,
...process.env.NODE_ENV === 'production'
? [purgecss]
: []
]
}