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

Allow environment variables to be mutable in development. #22072

Merged
merged 3 commits into from
Apr 10, 2023

Conversation

EvanBacon
Copy link
Contributor

Why

React Native is extraneously defining the environment variables, so we need to allow them to mutate. This is a bit problematic since they can only be mutated in development and not in production, meaning there's a fork of behavior.

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Apr 10, 2023
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Apr 10, 2023
@EvanBacon EvanBacon merged commit e91a49b into main Apr 10, 2023
4 of 7 checks passed
@EvanBacon EvanBacon deleted the @evanbacon/metro-config/definable-process-env branch April 10, 2023 22:25
@Simek
Copy link
Collaborator

Simek commented Apr 11, 2023

@EvanBacon It look like this PR broke the docs build:

@@ -371,6 +371,7 @@ From here, you can choose to generate basic project files like:
| `EXPO_USE_PATH_ALIASES` | **boolean** | <StatusTag status="experimental" note="SDK 49+" /><br/>Allow Metro to use the `compilerOptions.paths` and `compilerOptions.baseUrl` features from **tsconfig.json** or **jsconfig.json**) to enable import aliases and absolute imports. |
| `EXPO_USE_CUSTOM_INSPECTOR_PROXY` | **boolean** | <StatusTag status="experimental" note="SDK 49+" /><br/>Use a customized inspector proxy with improved support for the Chrome DevTools protocol.<br/>This includes support for the network inspector. |
| `EXPO_USE_TYPED_ROUTES` | **boolean** | <StatusTag status="experimental" note="SDK 49+" /><br/>Generate TypeScript types for Expo Router.<br/>This includes support for the network inspector. |
| `EXPO_NO_CLIENT_ENV_VARS` | **boolean** | <StatusTag note="SDK 49+" /><br/>Prevent inlining `EXPO_PUBLIC_` environment variables in client bundles. |
Copy link
Collaborator

@Simek Simek Apr 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

status is a required prop.

@Simek Simek mentioned this pull request Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants