-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsvgo.config.js
More file actions
54 lines (54 loc) · 806 Bytes
/
svgo.config.js
File metadata and controls
54 lines (54 loc) · 806 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
export default {
multipass: true,
js2svg: {
indent: '\t',
pretty: true,
},
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
cleanupNumericValues: {
floatPrecision: 2,
},
},
},
},
{
name: 'removeAttrs',
params: {
attrs: [
'width',
'height',
'fill-rule',
'clip-rule',
'(fill="none")', // Verwijder fill="none" expliciet
],
},
},
{
name: 'convertColors',
params: {
currentColor: /^#000(000)?$|^black$/i,
},
},
// Custom plugin om fill="none" te verwijderen
{
name: 'removeFillNone',
type: 'visitor',
fn: () => {
return {
element: {
enter: (node) => {
if (node.attributes.fill === 'none') {
delete node.attributes.fill;
}
}
}
};
}
},
],
};