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.
Bug Fixes
- fix XML entities in generated JavaScript (#553) (b3998eb)
- formatExportName for single names (#548) (5decc94)
- template: make it possible to use type in template (#619) (5966714), closes #556
- webpack: fix webpack 5 behaviour with url-loader (1a8cc98)
Features
- add option to explicitly use named export (#584) (f18ea80)
- add TypeScript declarations to
[@svgr](https://github.com/svgr)/core
(#555) (681303a) - add webpack typescript preset configuration (#573) (16072d4)
- upgrade to svgo v2 (1f107af)
- typescript: types everything (#611) (1666432)
- add "index" option (#607) (4978610)
- cli: allow all CLI options in config (#615) (aa9feb2), closes #570
- support jsxRuntime (#613) (3700aba)
- support mask-type property (#621) (a857bb1), closes #336
- allow to specify icon size (3c0b779), closes #571
- support CSS variables (cbdb47f), closes #582
BREAKING CHANGES
- Config format of SVGO changes & SVGR does not merge SVGO config
- Template has a new format
- core: @svgr/core now exposes { transform } instead of default export
- using --icon as latest arg now requires "--"