Detect `fsevents` for dev environments, fall back to polling if it is not found
As a safety measure to prevent high CPU usage when running webpack on the GDK we should try and detect if fsevents
exists, should it not we should fallback to polling for file changes
per this discussion on: !25637 (comment 293644632)
This problem pops up from time to time and it's almost always related to
fsevents
, however I've never had it occur myself so I'd be interested to see if we can find the underlying reason. I'd love to find a way to auto-detect whenfsevents
is not functioning properly so that we can produce a warning to users rather than silently falling back to CPU-intensive polling of a massive number of files.
Edited by Lukas 'ai-pi' Eipert