@svgr/plugin-jsx
Transforms SVG into JSX.
Install
Usage
.svgrrc
How does it work?
@svgr/plugin-jsx
consists in three phases:
Parsing the SVG code using svg-parser
Applying
@svgr/babel-preset
transformations
Applying custom transformations
You can extend the Babel config applied in this plugin using jsx.babelConfig
config path:
Several Babel plugins are available:
If you want to create your own, reading Babel Handbook is a good start!
License
MIT
Last updated