Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace hard default of 'json' in sourceExts with package.json Watche…
…rImpl glob Summary: This follows up D9942449 (f9539ef) by replacing this internal and undocumented config merge with a more specific `**/package.json` glob pattern for Watchman within `metro-file-map`. **Who this affects**: Only users who have overridden the `resolver.sourceExts` option and have removed `'json'` from this list. **What this fixes**: - **Changed**: Configuring `resolver.sourceExts` with a list that excludes `'json'` will now cause implicit `require`/`import`s of a `.json` file to fail (e.g. the resolver will **not** translate `import someData from './someData';` to `./someData.json` in an app's source code). - **No change**: `package.json` files will always be internally recognised to be used by `metro-resolver`. Changelog: **[Breaking]** `.json` files will no longer be implicitly resolved if removed from `resolver.sourceExts` Reviewed By: robhogan Differential Revision: D37998169 fbshipit-source-id: e1d51c8fb28cd55577088e03ac689a030c7711bb
- Loading branch information