Manage Multiple Environments - variables #2466
-
I noticed that the cookbook brings a recipe allowing us to set up env variables but I'm not sure how I would place them. I need something like this:
Should I place to my babel.config.js like this:
Thanks for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hey @filippobarcellos, thanks for your interest in Ignite! You can achieve this via the https://github.com/infinitered/ignite/blob/master/boilerplate/app/config/config.dev.ts |
Beta Was this translation helpful? Give feedback.
-
But it's only two env (dev & release), how to set more env? |
Beta Was this translation helpful? Give feedback.
-
you can config env inside native part like build.gradle on android and setup build config in xcode ios |
Beta Was this translation helpful? Give feedback.
-
Isn't it different? I can call any config inside app/config/* from js code, but can I call it from js code if I use env on native part like build.gradle? |
Beta Was this translation helpful? Give feedback.
-
Yes its different, when you build the app you need to choose the env in native side, android use need select flavor, ios you need select configuration |
Beta Was this translation helpful? Give feedback.
Hey @filippobarcellos, thanks for your interest in Ignite! You can achieve this via the
app/config/*
config files. I think this fits your use case perfectly.https://github.com/infinitered/ignite/blob/master/boilerplate/app/config/config.dev.ts