After `eas update` loosing environmental variables from `Constants.manifest?.extra`

I have the application published and when I’m pushing updates, I’m losing environmental variables.

extra: {
  API_URL: process.env.API_URL,
  APP_ENV: process.env.APP_ENV,
  DEEP_LINK: process.env.DEEP_LINK,
},

What’s the best way to handle this?

Those values are part of the js bundle, so when you run update it overrides them with new ones. You need to specify those envs when you run eas update. To avoid accidental breaks during publish you can throw and error in app.config.js if values are not defined or use sth like direnv to load those variables when you enter project directory.