Closed medihack closed 2 years ago
Without checking the example repo my initial gamble would be this line:
There was a previous issue about this here:
Alright, I guess that's it. Funky stuff :-) Maybe a condition that always returns true could get rid of the warning (see https://stackoverflow.com/a/34523915).
Merged your PR @medihack but as this is not an urgent fix I will only create a release when a few more fixes/features are in master...
When adding Chevrotain to a project I get an "unreachable code after return statement" warning on the console in Firefox only. It is hard to tell exactly where it originates, maybe from the "cst-dts-gen" package (from what I can tell from the line Firefox shows me). I am also not sure if this problem only occurs in combination with Webpack, but I can easily reproduce it in a Next.js app.
I setup a little example repository. As soon as I import Chevrotain and use it (like here, the above warning occurs. It doesn't seem to break anything as far as I can tell.