NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #2140 most downloaded on npm
Transform SVG into JSX
Latest stable
8.1.0
Last release 3 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 6 months
Nearly every release is documented
notes for 30 of 31 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
36 releases · first in 2018
Drag across the ruler to compare, or tap a release to open it.
cli: fix default dimensions, prettier & svgo
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Note: Version bump only for package @svgr/plugin-jsx
### Bug Fixes * fix peer dependencies
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
Note: Version bump only for package @svgr/plugin-jsx
rollup: missing dep & missing map return
fix previous export system (1872829), closes #635
SVGR v6 uses SVGO v2 under the hood and includes tons of improvement. It also contains small breaking changes. In most cases you will have nothing to…
SVGR v6 uses SVGO v2 under the hood and includes tons of improvement. It also contains small breaking changes. In most cases you will have nothing to change. But be sure to check the migration guide.
[@svgr](https://github.com/svgr)/core (#555) (681303a)allow to specify icon size (3c0b779), closes #571
template: make it possible to use type in template (#619) (5966714), closes #556
formatExportName for single names
Template signature has changed, it is now much more simpler to create custom templates. Also you don't have to do anything specific to use TypeScript in your template. If you need some Babel specific things you have to import it by yourself.
v5.x
const template = (
{ template },
opts,
{ imports, interfaces, componentName, props, jsx, exports }
) => {
const plugins = ["jsx"];
if (opts.typescript) {
plugins.push("typescript");
}
const typeScriptTpl = template.smart({ plugins });
return typeScriptTpl.ast`${imports}
${interfaces}
function ${componentName}(${props}) {
return ${jsx};
}
${exports}
`;
};
module.exports = template;
v6.x
const template = (variables, { tpl }) => {
return tpl`
${variables.imports};
${variables.interfaces};
const ${variables.componentName} = (${variables.props}) => (
${variables.jsx}
);
${variables.exports};
`;
};
module.exports = template;
fix XML entities in generated JavaScript
[@svgr](https://github.com/svgr)/core (#555) (681303a)typescript: fix react-native support #465
wrap svg component directly with memo/forwardRef
ForeignObject support for react native (#430) (1b56b85)Note: Version bump only for package @svgr/plugin-jsx
Note: Version bump only for package @svgr/plugin-jsx
fix typescript types (ref, title)
cli: remove confusion between {keep,ignore}-existing (#413) (c5430f9), closes #390
verify that svgoConfig.plugins is an array
Note: Version bump only for package @svgr/plugin-jsx
Note: Version bump only for package @svgr/plugin-jsx
Note: Version bump only for package @svgr/plugin-jsx
### Bug Fixes * fix engines in package.json
cli: fix "--out-dir" with single svg (b56407e), closes #304
### Performance Improvements * replace rehype with svg-parser
titleProp: handle the existing title case by using element instead of value (children)
cli: output relative destination paths
keep viewBox when dimensions are removed
add parcel plugin (#235) (144dbe3), closes #215
Note: Version bump only for package @svgr/plugin-jsx
Note: Version bump only for package @svgr/plugin-jsx
Note: Version bump only for package @svgr/plugin-jsx
babel-plugin: fix usage of spread attribute
hast-util-to-babel-ast: replace tabs by spaces in attributes (b0f3d19), closes #219
babel-plugin-transform-svg-component: support template that only return a single node (80ac40f), closes #223
⚡️ Twice faster @svgr/webpack (used in create-react-app) ✨ Ids are now automatically prefixed using filename 🔥 All new engine powered by rehype + Babe
⚡️ Twice faster @svgr/webpack (used in create-react-app) ✨ Ids are now automatically prefixed using filename 🔥 All new engine powered by rehype + Babel
template option must now returns a Babel AST@svgr/core does not include svgo & prettier by default@svgr/plugin-jsxOne column per quarter.