$ npm install @svgr/hast-util-to-babel-ast
Transforms HAST into Babel AST.
npm install --save-dev @svgr/hast-util-to-babel-ast
import { parse } from 'svg-parser'
import hastToBabelAst from '@svgr/hast-util-to-babel-ast'
const hastTree = parse(`<svg></svg>`)
const babelTree = hastToBabelAst(hastTree)
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE