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