Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

317
Views
Expo React Native Environment Setup

I am gonna set some environment variables something like API key. I am using expo and babel.

I have followed expo documentation but no luck. https://docs.expo.dev/guides/environment-variables/#from--babelconfigjs

I would appreciate if anybody has advice about this. Here is my babel.config.js Thanks.

//babel.config.js
module.exports = function(api) {
  api.cache(true);
  return {
    presets: [‘babel-preset-expo’],
    plugins: [
      [
        “module-resolver”, {
          “extensions”: [
            “.js”,
            “.ts”,
            “.tsx”,
            “.css”
          ],
          “root”: [ “./src” ],
          “alias”: {
            “assets”: “./src/assets”,
            “type”: “./src/type”,
          }
        },
      ],
      [
        “inline-dotenv”, {
          path: ‘.env’
        }
      ]
    ]
  };
};


//.env
API_KEY=something

//const.js
export const THIRDPARTY = {
  api_key: process.env.API_KEY,
}

//home.js
useEffect(() => {
  console.log("env_api_key", THIRDPARTY.api_key);    ////////undefined///////
})
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!