"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = minifySvg; var _svgo = require("svgo"); /** Minify SVG with SVGO */ function minifySvg(tree, options, svgoOptions = {}) { tree.match({ tag: 'svg' }, node => { let svgStr = tree.render(node, { closingSingleTag: 'slash', quoteAllAttributes: true }); const result = (0, _svgo.optimize)(svgStr, svgoOptions); node.tag = false; node.attrs = {}; node.content = result.data; return node; }); return tree; }