In my experience, babel is the single most unreliable and unusable piece of the build machine.
The issue to blame is https://github.com/facebook/react-native/issues/12590 which has been "iceboxed" and not fixed. In short, I have to patch metro each build, to increase the time it waits before killing babel, since the 5 minute timeout simply doesn't cut it.
Debug builds would take over 30m to transform with babel.
Hmm, sorry it feels that way! I don't use react-native and don't think anyone on the team was informed of that issue - but is it really an issue from Babel itself?
I guess in that case I would suggest not transforming files like ".json" which if it's a wrapper around Babel could do for you automatically? It's not intended to transform JSON since it would just have the same output, not sure how it's related to compiling JS specifically.
It's certainly possible that the babel team was never aware of it, but I'd imagine this has to do with the seemingly exponential growth of transformation time per source KB.
I'm on the React Native team and if this is still an issue, we still want to know about it. As others said, the icebox occurs automatically after a period of inactivity.
From quick glance, this seems more related to Metro, the packager that React Native uses. It was split out from the React Native repo and the team working on it is extremely receptive. I'd recommend opening a new issue on https://github.com/facebook/metro and linking to the issue in the RN repo.
People (including a team member of mine) are still commenting on https://github.com/facebook/react-native/issues/8475 which has been iceboxed and never re-opened. Same problem, which made the RN team seem very unreceptive.
Indeed, I think it's worth a shot to see if the metro team is more receptive. Thanks for the suggestion.
If you are still having the issue, why not comment to reopen it?
The "icebox" was automatic after a period of inactivity, if you are still having the problem, they give pretty explicit instructions on how to respond.
Also, that doesn't sound like a Babel issue, as I've compiled JS files that were several MB before without taking an unreasonable amount of time.
> Also, that doesn't sound like a Babel issue, as I've compiled JS files that were several MB before without taking an unreasonable amount of time.
The error is specifically that transformation of the JS times out, so it very much appears to be a babel issue. It might be something specific to the RN preset though.
The issue to blame is https://github.com/facebook/react-native/issues/12590 which has been "iceboxed" and not fixed. In short, I have to patch metro each build, to increase the time it waits before killing babel, since the 5 minute timeout simply doesn't cut it.
Debug builds would take over 30m to transform with babel.