I'm building a React app, and one of my classes is... large. It's doing a ton of complicated math on a ton of disparate data types, and cetera, and it's hovering around 2,500 lines.
At some point, I started getting a Ruby error, namely
ReferenceError: unknown: console is not defined. And after some poking around deleting and re-adding various bits of code, I stumbled upon the following fun fact: babel will run successfully if there are 100,000 characters or fewer in my file, and fail with the above error if there are 100,001 characters or more.
I raised the issue with the react-rails guys, and they've reproduced it outside of React; they're able to get babel-transpiler to misbehave with a large comment block just as I am.
Is this a thing that I can configure my way around? Or a thing that will change in a future version of babel? Or do I need to take a look at a massive refactor in an attempt to split my class across several smaller files?