Closed diegofsza closed 6 years ago
Sorry I haven't gotten back to you on this one! I just updated the README
If more than dev
and prod
environments are wanted, there are a few things you will need to do.
optimization.config.js
and webpack.config.js
IONIC_ENV
variable to be something else. For example:
'./src/environments/environment' + (process.env.MY_ENV === 'prod' ? '' : '.' + process.env.MY_ENV) + '.ts'
package.json
another run script and name it whatever you would like
"serve:testing": "MY_ENV=testing ionic-app-scripts serve"
src/environments/environment.testing.ts
. This should be whatever you set your MY_ENV
to.package.json
$ npm run serve:testing
How do I run it for android and ios build?
Hi, thank you for this approach. It worked perfectly.
However, It isn't clear to me how to run the app with a custom environment. Let´s suppose I have a custom configuration file called "
environment.testing.ts
", how would you start / build the app from command line with that configuration?Thanks!