$ gnpm install @svgr/babel-plugin-add-jsx-attribute
npm install --save-dev @svgr/babel-plugin-add-jsx-attribute
.babelrc
{
"plugins": [
[
"@svgr/babel-plugin-add-jsx-attribute",
{
"elements": ["svg"],
"attributes": [
{
"name": "width",
"value": "200",
"spread": false,
"literal": false,
"position": "end"
}
]
}
]
]
}
MIT
Copyright 2013 - present © cnpmjs.org | Home |