fix: autolinking.json breaks whenever console.log is added to react-native.config.js
Summary
Fixes https://github.com/react-native-community/cli/issues/2678. Please refer https://github.com/react-native-community/cli/issues/2678 for detailed issue of the bug.
Maybe add this behind a flag and pass the same flag in RNGP when autolinking.json gets created
Test Plan
Can be tested by adding console.log to react-native.config.js and then running npx @react-native-community/cli config
Checklist
- [x] Documentation is up to date.
- [x] Follows commit message convention described in CONTRIBUTING.md.
- [x] For functional changes, my test plan has linked these CLI changes into a local
react-nativecheckout (instructions).
Not sure why you would want to add console.logs in your react-native.config.js though
Hey @cortinico Honestly, I'm not even sure if we actually need this — I just stumbled upon the bug while debugging something else. It doesn’t impact me personally, but I figured I'd give it a shot and patch it anyway… you know, for the greater good 😄
There hasn't been any activity on this pull request in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.