-
Notifications
You must be signed in to change notification settings - Fork 12
/
postcss.config.js
27 lines (24 loc) · 770 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
const Purgecss = require('@fullhuman/postcss-purgecss')
const purgecss = Purgecss({
// Specify the paths to all of the template files in your project
content: [
'./resources/**/*.html',
'./resources/**/*.vue',
// etc.
],
// Include any special characters you're using in this regular expression
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || [],
whitelist: ['html', 'body'],
// 不处理的样式
// element-ui, mdi, nprogress
whitelistPatternsChildren: [/^el-/, /^v-/, /^mdi/, /^nprogress/],
})
module.exports = {
plugins: [
require('tailwindcss'),
require('postcss-import'),
require('postcss-url'),
require('autoprefixer'),
...(process.env.NODE_ENV === 'production' ? [purgecss] : []),
],
}