mirror of
https://github.com/status-im/metro.git
synced 2025-01-25 02:21:15 +00:00
95800d1564
Summary: @public We have a function that detects whether a give file is to be treated as a node_modules. If so it doesn't have access to the haste module map. There is an exception to this rule which is a few modules that are allowed to do that. Currently thats react-native, react-tools, and parse. The current implementation had a bug where if you had `react-native` (or react-tools etc) in the name before the actual package root then the detection will be off. This fixes the problem by starting from the `lastIndexOf('node_modules')` directory, that way nothing confuses us. Test Plan: ./runJestTests.sh export OSS, patch, run e2e test