SVG identifier is not declared in Babel's scope tracker as a JavaScript value binding
See original GitHub issueFirst 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:
- issue in babel on same problem - https://github.com/babel/babel/issues/10264
- here is an equivalent fix to the one that should be done here, but for another plugin - https://github.com/gaearon/react-hot-loader/pull/1293
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
SVG identifier is not declared in Babel's scope tracker as a ...
SVG identifier is not declared in Babel's scope tracker as a JavaScript value binding.
Read more >The exported identifier "_default" is not declared in Babel's ...
The exported identifier "_default" is not declared in Babel's scope tracker as a JavaScript value binding, and "@babel/plugin-transform- ...
Read more >Converse.js API Documentation Source: headless/dist/ ...
[\]\/\\])/g, '\\$1'); } function getType(value) { // IE8 doesn't return [Object Undefined] but [Object Object] for undefined value if (value === undefined) ...
Read more >babel/plugin-transform-typescript
For that, you will need to install and set up TypeScript. Note that although the TypeScript compiler tsc actively supports certain JavaScript proposals...
Read more >the different ways of declaring a function + 5 best practices
This is post # 52 of the series, dedicated to exploring JavaScript and its building components. In the process of identifying and describing ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ljharb I did some changes here https://github.com/airbnb/babel-plugin-inline-react-svg/pull/77 Could you please have a brief look?
I also would like to ensure I didn’t break anything by those changes so I was thinking about writing snapshot tests for resulted code (with Jest or smth) before merging that PR. Wdyt?
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?