When dependency does not have platforms property in dependency config, the config command was breaking when passing --platform [platformName] when it was trying to read platforms from such dependencies.
E.g. @react-native-webapis/web-storage contains react-native.config.js file where platforms are not defined, so config was breaking when trying to access it.
Closes #2463
Test Plan:
Run node ./path-to-cli/cli/build/bin.js config --platform ios
Verify the output was returned properly
Run node ./path-to-cli/cli/build/bin.js config --platform android
Verify the output was returned properly
Checklist
[x] Documentation is up to date to reflect these changes.
[x] Follows commit message convention described in CONTRIBUTING.md
@micaww mind checking if the solution work? To test this change you can simple change the line inside node_modules/@react-native-community/cli-config/...
Summary:
When dependency does not have
platforms
property in dependency config, theconfig
command was breaking when passing--platform [platformName]
when it was trying to readplatforms
from such dependencies.E.g. @react-native-webapis/web-storage contains
react-native.config.js
file whereplatforms
are not defined, so config was breaking when trying to access it.Closes #2463
Test Plan:
node ./path-to-cli/cli/build/bin.js config --platform ios
node ./path-to-cli/cli/build/bin.js config --platform android
Checklist