Created
January 31, 2020 13:23
-
-
Save jschatz1/9cede245de6cdbca5fd0e34ce8d657e5 to your computer and use it in GitHub Desktop.
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
const svgconfig = require("./svg.config"); | |
const svgo = new SVGO(svgconfig); |
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
module.exports.svgconfig = { | |
plugins: [ | |
{ | |
cleanupAttrs: true | |
}, | |
{ | |
removeDoctype: true | |
}, | |
{ | |
removeXMLProcInst: true | |
}, | |
{ | |
removeComments: true | |
}, | |
{ | |
removeMetadata: true | |
}, | |
{ | |
removeTitle: true | |
}, | |
{ | |
removeDesc: true | |
}, | |
{ | |
removeUselessDefs: true | |
}, | |
{ | |
removeEditorsNSData: true | |
}, | |
{ | |
removeEmptyAttrs: true | |
}, | |
{ | |
removeHiddenElems: true | |
}, | |
{ | |
removeEmptyText: true | |
}, | |
{ | |
removeEmptyContainers: true | |
}, | |
{ | |
removeViewBox: false | |
}, | |
{ | |
convertStyleToAttrs: true | |
}, | |
{ | |
convertColors: true | |
}, | |
{ | |
convertTransform: true | |
}, | |
{ | |
removeUnknownsAndDefaults: true | |
}, | |
{ | |
removeNonInheritableGroupAttrs: true | |
}, | |
{ | |
removeUselessStrokeAndFill: true | |
}, | |
{ | |
removeUnusedNS: true | |
}, | |
{ | |
cleanupIDs: true | |
}, | |
{ | |
cleanupNumericValues: true | |
}, | |
{ | |
sortAttrs: true | |
}, | |
{ | |
removeAttrs: { attrs: "(stroke|fill)" } | |
} | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment