File tree 3 files changed +6
-2
lines changed
3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## 0.1.3
4
+
5
+ Expose svgToJSX for reuse in other build pipelines
6
+
3
7
## 0.1.2
4
8
5
9
Use only ` load ` to skip source maps
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vite-plugin-fast-react-svg" ,
3
3
"description" : " Turn SVG into React components, without Babel" ,
4
- "version" : " 0.1.2 " ,
4
+ "version" : " 0.1.3 " ,
5
5
"license" : " MIT" ,
6
6
"author" : " Arnaud Barré (https://github.com/ArnaudBarre)" ,
7
7
"main" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export default function svgPlugin(): Plugin {
27
27
} ;
28
28
}
29
29
30
- const svgToJSX = ( svg : string ) =>
30
+ export const svgToJSX = ( svg : string ) =>
31
31
`import React from "react";const ReactComponent = (props) => (${ svg
32
32
. replace ( / \s ( [ a - z - :] * ) = " [ ^ " ] * " / gu, ( string , key : string ) => {
33
33
if ( key . startsWith ( "data-" ) ) return string ;
You can’t perform that action at this time.
0 commit comments