- Vite 6 as a peer deps
- Drop support for
?inline
, this now supported into core in v5 - ESM only, requires node 18
- Vite 5 as a peer deps
Turn SVG into React components, even faster.
This new version uses only regex and dangerouslySetInnerHTML to directly create a JS output.
Breaking changes:
- No more options available
- Expose the new
svgToJS
function instead of the previoussvgToJSX
Compatible with Vite 4.
Forward ref to svg element
Added useInnerHTML
option to use dangerouslySetInnerHTML
for SVG contents which improve bundle size.
Breaking: Use named export instead of default export for better esm/cjs interop. Closes #2
To migrate, replace your import by import { svgPlugin } from "vite-plugin-fast-react-svg";
Add vite@3 to peer dependency range
Expose svgToJSX for reuse in other build pipelines
Use only load
to skip source maps
Fix build issue with empty source maps
Initial release