-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpostcss.config.js
36 lines (34 loc) · 998 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
33
34
35
36
const plugins = {
'postcss-import': {},
'tailwindcss/nesting': {},
'tailwindcss': {},
'postcss-functions': {
functions: {
'svg-uri': value => {
const svg = value
.replace(/^['"]|['"]$/g, '')
.replace(/%/g, '%25')
.replace(/</g, '%3C')
.replace(/>/g, '%3E')
.replace(/&/g, '%26')
.replace(/#/g, '%23')
.replace(/{/g, '%7B')
.replace(/}/g, '%7D');
return `url(${JSON.stringify(`data:image/svg+xml;charset=utf-8,${svg}`)})`;
}
}
},
'postcss-preset-env': {
autoprefixer: {
flexbox: 'no-2009',
grid: false
},
features: {
'nesting-rules': false,
'prefers-color-scheme-query': false
},
preserve: false,
stage: 1
}
};
module.exports = { plugins };