Open JonnyBurger opened 9 months ago
yea this happens also in next js, when i using the app router endpoint
@JonnyBurger I think the config may need the plugins: ['@svgr/plugin-jsx']
part to transform to JSX. Otherwise it only transforms the SVG.
I was running into the same issue and @rossmoody suggestion worked for me. Thanks 🙇
@JonnyBurger I think the config may need the
plugins: ['@svgr/plugin-jsx']
part to transform to JSX. Otherwise it only transforms the SVG.
Thank you! The docs aren't clear about this at all.
The docs are really bad about this. Literally zero indication that anything extra is needed, and doesn't use the plugin in any examples. Yet, the entire project is about converting raw SVGs to React Native SVGs, so its easy to assume this is what it does, instead of just outputting the exact same input.
I ran the following script off the documentation:
optimize.mjs
And ran it with Node. The output was
I expected the output to be in React syntax.
I used v3.0.2 of the package.