| 2cc01efb | 05-Jul-2023 |
Keith Kurak <[email protected]> |
[docs] Update environment variable guides for SDK 49 integrated env (#23242)
# Why
Originally this started as creating a migration guide going from other
env setups to the new integrated env in SD
[docs] Update environment variable guides for SDK 49 integrated env (#23242)
# Why
Originally this started as creating a migration guide going from other
env setups to the new integrated env in SDK 49, but this new system kind
of creates ripples throughout all our environment variable
documentation.
~~This is currently in-progress; wanted to check in here with updates to
the general environment variable guide to see if it sounds OK before I
work on the others~~
# How
- [x] Update [General Environment Variables
Guide](https://docs.expo.dev/guides/environment-variables/) - refocus
things around the new integrated environment variables, replace the
various suggested solutions with _how to migrate from_ the various
previous suggested solutions, with still just a little info in case
you're on 48 or earlier. Also wanted to stay squarely focused on the
Expo CLI here, saving details about how it works with EAS Build and EAS
Update for those documents (see below).
- [x] Cross-reference/ link with [existing Metro env variable
documentation](https://docs.expo.dev/versions/v49.0.0/config/metro/#client-environment-variables).
Shortened this to a link to the guide, leaving the more technical
configuration flags to this document
- [x] Update [EAS Build env variable
doc](https://docs.expo.dev/build-reference/variables/) - `EXPO_PUBLIC_`
in-code substitutions do work from .env files that are available to EAS
Build, though you can also specify them in **eas.json**. Seems possible
that using them here could conflict with stuff like uploading a .env via
EAS Secrets. The major update may be clarifying how to prevent your
local .env files from being accidentally used (in my experience, they
get picked up unless they're excluded via .easignore).
- [x] Update [EAS Update env variable
doc](https://docs.expo.dev/eas-update/environment-variables/) - the
`EXPO_PUBLIC_` in-code substitutions do work (they do not show up when
reading the dynamic app config in `eas update`), so there's not much to
add from the main guide. I moved the advice for how to use environment
variables with EAS Update and EAS Build to this page. Instead of 2-3
suggestions, tried to provide one suggestion on how to make everything
work together.
# Test Plan
<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]>
Co-authored-by: James Ide <[email protected]>
show more ...
|