-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvgo.config.js
45 lines (45 loc) · 1.46 KB
/
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
module.exports = {
floatPrecision: '2',
gzip: true,
multipass: true,
plugins: [
{
// https://svgo.dev/docs/preset-default
name: 'preset-default',
params: {
overrides: {
// We want to keep the `viewBox` attribute in favour of
// dimensions (`width` and `height`).
// https://svgo.dev/docs/plugins/remove-viewbox
removeViewBox: false,
},
},
},
// https://svgo.dev/docs/plugins/remove-dimensions
'removeDimensions',
// https://svgo.dev/docs/plugins/cleanup-list-of-values
'cleanupListOfValues',
// https://svgo.dev/docs/plugins/convert-style-to-attrs
'convertStyleToAttrs',
// https://svgo.dev/docs/plugins/remove-raster-images
// 'removeRasterImages',
// https://svgo.dev/docs/plugins/remove-scripts
'removeScriptElement',
// https://svgo.dev/docs/plugins/remove-style-element
'removeStyleElement',
// https://svgo.dev/docs/plugins/reuse-paths
'reusePaths',
{
name: "removeAttributesBySelector",
params: {
selectors: [{
selector: 'svg',
attributes: [
'xml.space',
// 'xmlns.xlink',
],
}],
}
},
],
};