Create React App has been designed to give you a pre-configured setup for your React project. However, if you want to customize the configuration (for example, the Webpack or Babel configuration), you have two main options:
1. Ejecting – This is a one-time decision that you can’t undo. It will take your current project and output the configuration and scripts into the project. This allows you full control of the project configuration, but means that you are now responsible for maintaining and upgrading these configurations.
To eject your project, you can run `npm run eject` in your project directory.1. Override Configuration without Ejecting – This means using a third-party library like `react-app-rewired` which allows you to tweak the Create React App configuration without needing to eject the project.
1. Using an environment variable – Create React App allows to use environment variables prefixed with `REACT_APP_`. The environment variables are embedded during the build time.
For instance, you can create `.env` file in the root of your project and put your variables like this: `REACT_APP_SECRET_CODE=abcdef` And then, you can access this variable in your app like so: `process.env.REACT_APP_SECRET_CODE`Remember that if you feel the need to customize the configuration, it may be worth considering to set up the project on your own (without Create React App) because it can be difficult to configure or rewire the Create React App without ejecting.