Wrapper around svgo
import { svgoOptimize } from '@figma-extractor/svgo-optimize'
nodes
.map((node) => svgoOptimize(node))
.forEach((node) => {
// node.content overwritten with result of optimization
})
svgoOptimize(node: Node, plugins: svgo.Plugin[] = defaultPlugins)
defaultPlugins
: modification ofpreset-default
withremoveViewBox
turned offcurrentColorPlugin
: replacesfill
andstroke
withcurrentColor
. Useful for inlined single-colored icons