-
Notifications
You must be signed in to change notification settings - Fork 93
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
SVG identifier is not declared in Babel's scope tracker as a JavaScript value binding #74
Comments
Seems like a PR that registers the variable (only when that API is present) would be a good patch release? Could you provide the specific warnings you see? |
@ljharb agree on patch! I've spent about 2 hours trying to figure out what should it be but didn't make any progress since am a newbie to babel plugin development (I've started with handbook). Also struggled to find any docs about The warning:
|
https://github.com/airbnb/babel-plugin-inline-react-svg/blob/master/src/index.js#L140 is one example of something being registered on the scope. does that help? |
Although snapshot tests are brittle and a terrible way of testing, we're already doing that here: https://github.com/airbnb/babel-plugin-inline-react-svg/blob/master/test/sanity.js Please do add that style of tests. |
@oleg-rdk thanks for the PR! I'm recently hitting this issue as well, would you like any help getting that PR over the finish line? |
Fixes airbnb#74. Co-authored-by: Oleg Buiar <[email protected]> Co-authored-by: Michael Vial <[email protected]>
First of all, thanks for your work!
Starting from Babel 7.5.2 (#10174 specifically),
console.warn
ings started to appear when using this plugin.It seems
babel-plugin-inline-react-svg
should be tweaked a bit to get rid of that warning.I'll try to find a solution, but it probably will take a lot of time for me to get familiar with the plugin and babel internals. So, if it's smth that could be done easily - I would appreciate your help.
Here I found some related links that might be helpful:
Thanks!
The text was updated successfully, but these errors were encountered: