-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostcss.config.js
32 lines (30 loc) · 908 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
28
29
30
31
32
const autoprefixer = require('autoprefixer');
const tailwindcss = require('tailwindcss');
const postcssPurgecss = require('@fullhuman/postcss-purgecss');
const purgecss = postcssPurgecss({
content: [
'./public/**/*.html',
'./src/**/*.vue',
'./src/**/*.ts',
],
whitelistPatterns: [
/-(leave|enter|appear)(|-(to|from|active))$/,
/^(?!(|.*?:)cursor-move).+-move$/,
/^router-link(|-exact)-active$/,
/^(tui.*|te.*|CodeMirror.*|hljs.*|code|pre)/,
],
whitelistPatternsChildren: [
/-(leave|enter|appear)(|-(to|from|active))$/,
/^(?!(|.*?:)cursor-move).+-move$/,
/^router-link(|-exact)-active$/,
/^(tui.*|te.*|CodeMirror.*|hljs.*|code|pre)/,
],
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
});
module.exports = {
plugins: [
tailwindcss,
autoprefixer,
...process.env.NODE_ENV === 'production' ? [purgecss] : [],
],
};