-
-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to use babel plugins #252
Comments
It seems that having a configuration without state, or state without Maybe we should use |
Hello @VincentCATILLON, I am sorry but this plugin is not designed to be used out of SVGR that's why you have some problem to make it work alone. Please use SVGR instead: https://www.smooth-code.com/open-source/svgr/docs/getting-started/. |
@neoziro is it in your roadmap to make usable elsewhere than svgr ? I mean that it would be great as a Babel transformer (changing svg input to react/react native component manipulating AST) in correlation with @svgr/core ofc. |
Yes it is in the roadmap to create a SVGR babel plugin, right now I don't have time to work on it but it is possible to create one! |
Check this out: https://www.npmjs.com/package/@dr.pogodin/babel-preset-svgr - my solution for the problem:
|
🐛 Bug Report
I'm trying to use your babel plugin, to be able to parse my SVG files as components at runtime.
Your project is awesome, but you don't have any documentation about Babel plugins, that's very sad.
So I tried to do that:
Metro
so):React-Native: 0.56.4
Babel 7
To Reproduce
Create a RN project, and modify the
.babelrc
file to have this:And then, when i define
componentName
property in my.babelrc
file (in state object):Expected behavior
I'd like to have my component well loaded, as it can be done using the
@svgr/cli
.Environment
The text was updated successfully, but these errors were encountered: