react-native-macos/packages/metro-config
Alex Hunt 1c4a505c17 Drop internal base config merge in metro-config (#36777)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36777

Changelog: [Internal]

Remove internal merge of `getDefaultConfig` (Metro base defaults) from `react-native/metro-config`. This is unnecessary given the config loading setup of RN CLI and Expo CLI, which use (or replicate) Metro's [`loadConfig`](1e47cb5b3c/packages/metro-config/src/loadConfig.js (L182-L190)) function — which will itself apply defaults appropriately.

This relates to a previously-breaking behaviour documented in the test plan of https://github.com/react-native-community/cli/pull/1896 (independently fixed and no longer load-bearing) (**read: no need to cherry pick this change**).

https://pxl.cl/2B8NS

While this has no effect under the fixed RN CLI setup, this is a worthwhile simplification to this package that better-aligns with current Metro tooling expectations.

## Notes

- `getDefaultConfig` no longer returns `ConfigT` (full config), and instead returns `MetroConfig` (partial config). This is non-breaking with the expected API of a given `metro.config.js` file.

Reviewed By: cipolleschi

Differential Revision: D44630645

fbshipit-source-id: 472c3967449dfb99f845a82d9e9c49efc343021c
2023-04-18 14:31:46 -07:00
..
index.js Drop internal base config merge in metro-config (#36777) 2023-04-18 14:31:46 -07:00
package.json Bump CLI to 12.0.0-alpha.3 and Metro to 0.76.2 (#36948) 2023-04-18 13:21:23 -07:00