-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpostcss.config.js
More file actions
26 lines (25 loc) · 873 Bytes
/
postcss.config.js
File metadata and controls
26 lines (25 loc) · 873 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
/**
* Main PostCSS configuration file used by webpack's postcss-loader
*
* We use PostCSS with all its features (including PurgeCSS) only for webpack builds,
* not for example files which use a simpler minification setup.
*/
module.exports = {
plugins: [
require('autoprefixer')(),
require('postcss-preset-env')({
browsers: 'last 2 versions',
stage: 3,
features: { 'nesting-rules': true }
}),
require('@fullhuman/postcss-purgecss').default({
content: ['./src/**/*.js', './diff-viewer/**/*.html', './diff-viewer/**/*.php'],
safelist: {
standard: [/vdm-theme/, /hljs/, /dragging/, /opened/, /selected/, /active/],
deep: [/vdm-alert/, /vdm-modal/, /vdm-icon/, /vdm-code/, /vdm-diff/, /vdm-badge/],
greedy: [/vdm-diff__chunk/, /vdm-alert/, /vdm-btn/]
}
}),
require('cssnano')()
]
};