circle-flags/svgo.config.js
HatScripts 79f0e95c8f Expand SVG attribute removal list in SVGO config
Added 'data', 'fill-rule', and 'xml' to the list of attributes removed by the SVGO 'removeAttrs' plugin to further optimize SVG files.
2025-12-06 21:55:56 +11:00

55 lines
1.2 KiB
JavaScript

module.exports = {
multipass: true,
floatPrecision: 1,
plugins: [
{
name: 'removeViewBox',
active: false
},
{
name: 'removeAttrs',
params: {
attrs: '(color|data|fill-rule|font|opacity|paint|stroke|text|xml).*'
}
},
'convertStyleToAttrs',
'cleanupListOfValues',
'removeRasterImages',
'sortAttrs',
'removeStyleElement',
'removeScriptElement',
'removeDoctype',
'removeXMLProcInst',
'removeComments',
'removeMetadata',
'removeEditorsNSData',
'cleanupAttrs',
'mergeStyles',
'inlineStyles',
'minifyStyles',
'cleanupIds',
'removeUselessDefs',
'cleanupNumericValues',
'convertColors',
'removeUnknownsAndDefaults',
'removeNonInheritableGroupAttrs',
'removeUselessStrokeAndFill',
'cleanupEnableBackground',
'removeHiddenElems',
'removeEmptyText',
'convertShapeToPath',
'convertEllipseToCircle',
'moveElemsAttrsToGroup',
'moveGroupAttrsToElems',
'collapseGroups',
'convertPathData',
'convertTransform',
'removeEmptyAttrs',
'removeEmptyContainers',
'mergePaths',
'removeUnusedNS',
'sortDefsChildren',
'removeTitle',
'removeDesc'
]
}