-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsvgo.config.js
38 lines (34 loc) · 860 Bytes
/
svgo.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
37
38
module.exports = {
plugins: [
{
name: 'preset-default',
overrides: {
removeViewBox: false
}
},
{
// Couldn't get name: "removeAttrs" to work with xml:space, so
// https://github.com/svg/svgo/issues/1283#issuecomment-782358666
name: 'removeXmlSpace',
type: 'perItem',
fn: (item) => {
if (item.hasAttr('xml:space')) {
item.removeAttr('xml:space')
}
}
},
// Don't remove class. Will make Hiper card lose 3 letters.
// Mir will have a className that will need to be removed after svgr.
// {
// name: 'removeAttrs',
// params: {
// attrs: "(class)"
// }
// },
// enable builtin plugin not included in default preset
'prefixIds',
'removeXMLNS',
'convertStyleToAttrs',
'removeDimensions'
],
};