Replies: 1 comment 2 replies
-
Looks like I can mostly make it work with a custom template, although I'll need to add the imports to the output file myself. const template = (variables, { tpl }) => tpl`
${variables.interfaces};
export const ${variables.componentName} = (${variables.props}) => (
${variables.jsx}
);
` |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using SVGR in a node.js script to convert all of our
.svg
files into react components. The returned react components are all named but exported by default, and these are all designed to be separate files as they also have the typescript import from react, etc.I'd rather write all of these in a single file, as named exports (no default), and only one set of imports at the top. I don't see any options for doing that. Is there some way to do this?
Beta Was this translation helpful? Give feedback.
All reactions