question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SVG identifier is not declared in Babel's scope tracker as a JavaScript value binding

See original GitHub issue

First of all, thanks for your work!

Starting from Babel 7.5.2 (#10174 specifically), console.warnings 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!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

1reaction
oleg-rdkcommented, Apr 11, 2020

@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?

1reaction
ljharbcommented, Mar 24, 2020

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found