Set up different env variables in build process

From my understanding, version 3.2 of ionic-app-scripts allows the ability to use process.env.MY_VAR syntax directly in typescript: https://github.com/ionic-team/ionic-app-scripts#environments
I originally discovered this reading over this thread here: https://github.com/ionic-team/ionic-cli/issues/1205.
I am a complete noob to the ionic build process and want to understand how I might be able to utilize this for creating a BASE_URL variable that would be dynamic for running either a “–prod” build or a “–dev” build to point to two different domains based on the build.
If someone could point me in the right direction that would be fantastic.