Hello Ozone devs. I am starting this discussion to get inputs of removing react-app-rewired as a dependency from the Recon Webapp. *Overview* Recon uses *react-app-rewired *to provide custom configs and overrides without requiring us to eject our react app. Why is this important ?
- Usually a React app will use a module-bundler (Webpack by default) and a transpiler (Babel by default) in order to compile and bundle the React code in a browser understandable format. - *Create-React-App* provides us these configs under the hood preventing us from changing them. - Now before deploying our app we might want to change/override these configs due to various reasons. This would require us to "eject" the React app and expose these configs which are hidden from us. - This "eject" command cannot be reversed i.e. once these configs get exposed we cannot go back to the original state where CRA would manage these configs. - *react-app-rewired* provides us a way to override them via a config-overrides.js without the need to "eject". Reasons I want to propose removal of this dependency: - react-app-rewired is a lightly maintained library as of CRA 2.0 mostly maintained by the community - this means it might lose support - I had a plan to migrate the Recon frontend to the newer versions of packages (this would include NodeJS as well). But react-app-rewired might be interfering as it causes conflicts in building the repo. - There are many other bundlers and transpilers that we can experiment with, and while JS is always having something new around the corner, sometime down the line as the codebase gets larger we might be interested in alternative building tools - Many other Apache projects have shifted to React (Ranger is an example) and they too eject the app to expose these configs. Though it would require us to initially configure everything for Webpack and Babel, later down the line it would be easier to maintain, and allow us more control overall as devs over what configs we want to add. It would be great to receive inputs from the community about this and suggestions/alternatives would be appreciated a lot. Thanks Abhishek