Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] - Public env variables loading customization option #1261

Open
ernestostifano opened this issue Apr 26, 2024 · 0 comments
Open

Comments

@ernestostifano
Copy link

Do you want to request a feature or report a bug?

Request a feature

What is the current behavior?

Currently, environment variables are loaded according to the docs (Environment variables in Expo), which is working just fine, but it cannot be customized.

What is the expected behavior?

It would be nice to have the possibility to customize which env variables get loaded into the app, without needing to use the EXPO_PUBLIC_ prefix.

Our use case is that we have a monorepo with multiple projects (FE Web, FE Mobile, BE Node, etc.) and there is a centralized approach to environment variables handling. So, we have managed to apply out custom approach to all projects, but not the EXPO ones.

As an example, Storybook supports the following approach:

const config = {
  /*
   * 👇 The `config` argument contains all the other existing environment variables.
   * Either configured in an `.env` file or configured on the command line.
   */
  env: (config) => ({
    ...config,
    EXAMPLE_VAR: 'A custom environment variable'
  })
};

Our final goal is not only to achieve consistency in environment variables naming across projects, but some variables can only be calculated during the build/start process, depending on the context.

Thanks for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant