Is it possible to give parameters using .config file to reactApp after running npm run build
I am fetching data thorugh a url in reactApp. I need to deploy only the built file.
After giving npm run build
, can't I change the values through config file like in Java. Or else re-building the app is the only solution?
process.env.SOME_VARIABLE is used to provide an environment variable. You can initialize this variable with build app command. Check more on create-react-app repo docs