-
Notifications
You must be signed in to change notification settings - Fork 0
/
svgo.config.js
47 lines (42 loc) · 912 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
39
40
41
42
43
44
45
46
47
/**
* Central SVGO configuration file
*/
export default {
plugins: [
{
name: "preset-default",
params: {
overrides: {
// Removing the viewBox breaks scaling of SVGs
// Only required to keep viewBox intact
// https://github.com/svg/svgo/issues/1128#issuecomment-1367070568
removeViewBox: false
}
}
},
// Enforce uniform scaling for all SVGs
// https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio?retiredLocale=de#syntax
{
name: "addAttributesToSVGElement",
params: {
attributes: [
{
preserveAspectRatio: "xMinYMin"
}
]
}
},
{
name: "removeDimensions"
},
{
name: "convertStyleToAttrs"
},
{
name: "removeRasterImages"
},
{
name: "removeScriptElement"
}
]
}