Closed sicks closed 8 years ago
This should be removed in the production build. It would need to be added to Webpack, something like webpack-strip.
Hmmm. Would there be a way to include it via some kind of debug mode? I'm using rails so I had to build this fork to my forked turbo_react-rails and then bundle that for me to confirm an error was being thrown on my development server.
You learn something new every day. I totally thought console
was standard. shakes fist
console
is standard, but you don't want to ship debugging in production code.
Hmm. I read things saying that some browsers only support it if you've opened the development console, and if you don't it throws errors.
Anywho, I still think it would be helpful if there was some way to know that TurboReact had a problem and returned the baton to Turbolinks, even in production. I ran into this because of content I'd added to my site (apparently bad content in a blog post). If I hadn't already been looking at this source all week (and even then, I only noticed because of that super helpful comment) I'm not sure how I would've ever figured out this was why transitions were failing only some of the time.
Maybe this should just be added to the readme?
console.dir(e)
to the rescue!I think this will be as good as it gets given we're not the ones throwing the error.