i'm trying to expo start my react native with typescript app on 3 different environments-development, local and testing. but when i run APP_ENV=testing expo start
or APP_ENV=development expo start
it always runs on local environment.i tried using APP_ENV=testing expo r -c
or APP_ENV=development expo r -c
and yarn start --reset-cache
and react-native-clean-project and non of those helped.in the root of my project i have a folder named "environments" with 4 files- ".env.local", ".env.development", ".env.testing" and "types.d.ts". this is the code containd in my "babel.config.js"-
api.cache(true); return { presets: ["babel-preset-expo"], plugins: ["react-native-reanimated/plugin", ["module:react-native-dotenv", { moduleName: "react-native-dotenv", path: "./environments/.env", blacklist: null, whitelist: null, safe: false, allowUndefined: true, }, ], ], };};
this is the code containd in types.d.ts file from environments folder- declare module "react-native-dotenv" { export const API_BASE_URL: string; }
i also added the following "typesRootes": ["./environments/types"]
to "tsconfig.json"
im really not sure how to solve this, any help will be much appreciated.