How can I create build for my dev server?
Created by: someden
For example:
I have two servers that provides frontend: foobar.com
and dev.foobar.com
And two servers that provides api: api.foobar.com
and api.dev.foobar.com
And I have variables for api
In .env.production
:
REACT_APP_API = https://api.foobar.com
In .env.development
:
REACT_APP_API = https://api.dev.foobar.com
I need something like this:
// in package.json
"build": "react-scripts build", // for production
"build-dev": "NODE_ENV=development react-scripts build", // for development
But I found in docs that I cannot override NODE_ENV manually.
So, how can I create build for my dev server?