babel-plugin-react-sketchapp-svg
v1.0.0-beta4
Published
A babel plugin that transforms SVG imports into react-sketchapp-compatible primitives.
Downloads
7
Maintainers
Readme
babel-plugin-react-sketchapp-svg
A babel plugin that transforms SVG imports into react-sketchapp-compatible primitives.
🚨 This is super BETA 🚨
This is my first dip into the babel plugin pool, so any help testing or developing would be greatly appreciated.
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": [
"babel-plugin-react-sketchapp-svg"
]
}
Options
verbose
- Log level (boolean
, default:false
)defaultWidth
- Default pixel width for SVG (string
ornumber
, default:100%
)defaultHeight
- Default pixel height for SVG (string
ornumber
, default:100%
)- ...inherited options from babel-plugin-inline-react-svg
Example:
{
"plugins": [
[
"babel-plugin-react-sketchapp-svg",
{
"defaultWidth": 32,
"defaultHeight": 32,
"svgo": {
"plugins": [
{
"removeAttrs": { "attrs": "(data-name)" }
},
{
"cleanupIDs": true
}
]
}
}
]
]
}