3

I am using 'create-react-app' npm from React starter https://github.com/Microsoft/TypeScript-React-Starter,

How do I have different config files for different environments (e.g. Dev, CI, production)? I want to store the endpoints, some app settings in those config files.

The only way that I can think of is to eject the project (npm run eject) and create the config json file using web pack.

Is there any better way to handle the different config files with 'create-react-app' npm? Thanks.

Michael Sync
  • 4,834
  • 10
  • 40
  • 58

0 Answers0