NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2204 most downloaded on npm
Transform SVG into React Components.
Last release 3 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 6 months
Most releases are documented
notes for 24 of 39 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
45 releases · first in 2018
cli: fix default dimensions, prettier & svgo
One column per quarter.
parseObject error causes website broken
SVGProps from import to import type (#853) (095f021)path) and the original SVG path (originalPath)SVGProps from import to import type (#853) (095f021)path) and the original SVG path (originalPath)allow specifying jsxRuntimeImport in config ( 86bb86f ), closes #801 #801
jsxRuntimeImport in config (86bb86f), closes #801 #801Nothing published for this version
fix Yarn peer dependency warning from @babel /core ( #786 ) ( db35837 ), closes #785
deps: add babel-preset to core dependencies
core: types field in package.json
cli: pass in parser to prettier format to avoid deprecation warning
Nothing published for this version
Nothing published for this version
svgr v6 is now only compatible with Webpack v5 and up. See the migration guide
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
typescript: fix react-native support #465
wrap svg component directly with memo/forwardRef
ForeignObject support for react native (#430) (1b56b85)Nothing published for this version
cli: remove confusion between {keep,ignore}-existing (#413) (c5430f9), closes #390
verify that svgoConfig.plugins is an array
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
cli: output relative destination paths
keep viewBox when dimensions are removed
add parcel plugin (#235) (144dbe3), closes #215
Nothing published for this version
Nothing published for this version
Nothing published for this version
prevent babel read babel.config.js
template option must now returns a Babel AST@svgr/core does not include svgo & prettier by defaultrollup: forward filePath in rollup plugin (461492b), closes #177 #188
getProps util for template (5cb238e), closes #187svgAttributes has been removed, please use svgProps instead.React.forwardRef. You don't have to use "svgRef"
prop, just use "ref" and it will work. React.forwardRef requires React
16.3.
convert)<a name="2.4.1"></a>
<a name="2.4.0"></a>
Nothing published for this version
Nothing published for this version
SVGR now supports Prettier (.prettierc) and SVGO (.svgo.yml) configurations. It also supports a new .svgrrc configuration. See the readme for more det
SVGR now supports Prettier (.prettierc) and SVGO (.svgo.yml) configurations. It also supports a new .svgrrc configuration. See the readme for more detail.
Rollup has now an official SVGR plugin available under @svgr/rollup.
SVGR is now an ecosystem of four modules:
@svgr/core: Core of SVGR, it exposes the Node API@svgr/cli: Command Line Interface@svgr/webpack: webpack loader@svgr/rollup: a fresh new Rollup pluginsvgAttributes and titleProp optionsTwo new options appears, the first one svgAttributes gives you the opportunity to add attribute on the root svg tag without creating a custom template:
Command:
svgr --svg-attributes focusable=true foo.svg
Output:
;(props) => <svg focusable="false" />
The second one, titleProp, adds a custom property title to specify the title of the SVG.
Command:
svgr --title-prop foo.svg
Output:
;({ title }) => (
<svg>
<title>{title}</title>
</svg>
)
Node v6 support has been dropped, you need Node >= 8 to run SVGR.
All Prettier options have been removed:
jsx-bracket-same-lineno-bracket-spacingno-semisingle-quotetab-widthtrailing-commause-tabsIf you used it, use a .prettierrc instead of use the new option --prettier-config:
v1.x:
svgr --no-semi file.svg
v2.x:
svgr --prettier-config '{"semi": true}' file.svg
All SVGO options have been removed:
idskeep-useless-defsno-titleno-view-boxprecisionIf you used it, use a .svgo.yml instead of use the new option --svgo-config:
v1.x:
svgr --ids file.svg
v2.x:
svgr --svgo-config '{"plugins": [{"cleanupIDs": {"remove": false, "minify": false}}]}' file.svg
replace-attr-value has been renamed into replace-attr-valuesIn API, replaceAttrValues is now an object instead of an array.
rawConvert method has been droppedcode, config and statecomponentName must now be passed in stateThanks to @MarquesDev and @lifeiscontent.
<a name="1.10.0"></a>
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →