You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the roots are derived from the watchFolders property in the Metro configuration. See DependencyGraph._createHaste() where JestHasteMap is instantiated.
We already have a Metro config option for setting which folders are watched. I think what we need is an option to choose what the roots are.
Maybe the roots list is expanded by haste as it runs? It seems to start out OK with just the folders we give it.
Metro by default will watch all the files within all the roots. This means that generally metro ends up watching all the files within node_modules.
The haste-map built internally by metro currently only has a single flag to control if the entire map is watched. Really this needs to be expanded to have a config to say which folders should be watched, rather than always watching all the roots.
https://github.com/facebook/metro/blob/96fb6e904e1660b37f4d1f5353ca1e5477c4afbf/packages/metro/src/node-haste/DependencyGraph.js#L165
The text was updated successfully, but these errors were encountered: