Created
February 26, 2024 22:00
-
-
Save itsmikita/287765c94c2fdf0681ffcd8627c7c92d to your computer and use it in GitHub Desktop.
Optimized configuration for optimizing SVGs 🤡
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
// js2svg: { | |
// indent: " ", | |
// pretty: true | |
// }, | |
multipass: true, | |
plugins: [ | |
"cleanupAttrs", | |
"cleanupEnableBackground", | |
"cleanupIds", | |
"cleanupListOfValues", | |
"collapseGroups", | |
"convertColors", | |
"convertPathData", | |
"convertShapeToPath", | |
"convertStyleToAttrs", | |
"convertTransform", | |
"removeComments", | |
"removeDesc", | |
"removeDimensions", | |
"removeDoctype", | |
"removeEditorsNSData", | |
"removeMetadata", | |
"removeNonInheritableGroupAttrs", | |
"removeOffCanvasPaths", | |
"removeRasterImages", | |
"removeScriptElement", | |
"removeUnknownsAndDefaults", | |
"removeUnusedNS", | |
"removeUselessDefs", | |
"removeUselessStrokeAndFill", | |
"removeTitle", | |
"removeXMLProcInst", | |
"removeEmptyAttrs", | |
"removeEmptyContainers", | |
"removeEmptyText", | |
"inlineStyles", | |
"mergeStyles", | |
"minifyStyles", | |
"removeStyleElement", | |
"removeHiddenElems", | |
{ | |
name: "mergePaths", | |
params: { | |
force: true, | |
noSpaceAfterFlags: true | |
} | |
}, | |
"sortAttrs", | |
{ | |
name: "addAttributesToSVGElement", | |
params: { | |
attributes: [ | |
{ focusable: "false" }, | |
{ fill: "currentColor" } | |
] | |
} | |
}, | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment