template_0205
This commit is contained in:
28
RN_TEMPLATE/app/config/index.ts
Normal file
28
RN_TEMPLATE/app/config/index.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* This file imports configuration objects from either the config.dev.js file
|
||||
* or the config.prod.js file depending on whether we are in __DEV__ or not.
|
||||
*
|
||||
* Note that we do not gitignore these files. Unlike on web servers, just because
|
||||
* these are not checked into your repo doesn't mean that they are secure.
|
||||
* In fact, you're shipping a JavaScript bundle with every
|
||||
* config variable in plain text. Anyone who downloads your app can easily
|
||||
* extract them.
|
||||
*
|
||||
* If you doubt this, just bundle your app, and then go look at the bundle and
|
||||
* search it for one of your config variable values. You'll find it there.
|
||||
*
|
||||
* Read more here: https://reactnative.dev/docs/security#storing-sensitive-info
|
||||
*/
|
||||
import BaseConfig from "./config.base"
|
||||
import DevConfig from "./config.dev"
|
||||
import ProdConfig from "./config.prod"
|
||||
|
||||
let ExtraConfig = ProdConfig
|
||||
|
||||
if (__DEV__) {
|
||||
ExtraConfig = DevConfig
|
||||
}
|
||||
|
||||
const Config = { ...BaseConfig, ...ExtraConfig }
|
||||
|
||||
export default Config
|
||||
Reference in New Issue
Block a user