mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 17:45:59 +00:00
324493edae
Summary: One consequence we didn't predict after introducing the Internal Transform Pipeline, was that when the workers would get started, we won't require the external transformer the user specified up until the first time each worker received a job. There're 2 visible consequences of this: (1) the transform progress bar seems to get stuck for about 5 seconds the first time the packager receives a request and (2) the first N (# of cores) HMR requests take way longer (about 4 seconds with FB's transformer instead of << 1 second) as we need to require lots of modules. This diff creates a temporary file for the js transformer workers that requires the user-specified transform file eagerly. That makes sure workers have imported babel and the transforms before receiving the first request. There are better ways to do this, like adding an `init()` method to the workers and call that eagerly. I will follow with another diff doing that. public Reviewed By: javache Differential Revision: D2812153 fb-gh-sync-id: 15be316b792d1acd878ed9303bea398aa0b52e1d