-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvgo.config.cjs
55 lines (55 loc) · 1.96 KB
/
svgo.config.cjs
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
55
module.exports = {
// don't load preset-default as this is to aggressive
// full list: https://github.com/svg/svgo#built-in-plugins
plugins: [
'cleanupAttrs',
'mergeStyles',
'inlineStyles',
'removeDoctype',
'removeXMLProcInst',
'removeComments',
'removeMetadata',
'removeTitle',
'removeDesc',
'removeUselessDefs',
'removeXMLNS',
'removeEditorsNSData',
'removeEmptyAttrs',
// 'removeHiddenElems', // can be dangerous,
'removeEmptyText',
// 'removeEmptyContainers', // required for transition slides which are empty groups
// 'removeViewBox', // can be dangerous
'cleanupEnableBackground',
'minifyStyles',
'convertStyleToAttrs',
'convertColors',
'convertPathData',
'convertTransform',
// 'removeUnknownsAndDefaults', // may interfere with gsap!
'removeNonInheritableGroupAttrs',
'removeUselessStrokeAndFill',
'removeUnusedNS',
// 'prefixIds', // this will kill ids as defined in illustrator. not good.
// 'cleanupIDs', // this will kill ids as defined in illustrator. not good.
'cleanupNumericValues',
'cleanupListOfValues',
'moveElemsAttrsToGroup', // observe if this is dangerous
'moveGroupAttrsToElems',
// 'collapseGroups', // probably good, collapses groups without an id
// 'removeRasterImages'
'mergePaths',
// 'convertShapeToPath', // this kills 'rect' elements and thus foreignObject. not good.
'convertEllipseToCircle',
// 'sortAttrs' // not needed, as we don't need to read the svg nicely
'sortDefsChildren',
// 'removeDimensions', can be dangerous
// 'removeAttrs', // can be dangerous and needs to be configured
// 'removeAttributesBySelector', // can be dangerous and needs to be configured
// 'addClassesToSVGElement', // not needed
// 'addAttributesToSVGElement', // not needed
// 'removeOffCanvasPaths', // not needed and can be tricky if you rely on off-canvas paths
// 'removeStyleElement', // maybe dangerous
// 'removeScriptElement', // maybe dangerous
// 'reusePaths', // not needed
],
};