Skip to content

[build-tools] Use production mode for app config, prebuild, and Expo Doctor - #4180

Draft
ramonclaudio wants to merge 11 commits into
mainfrom
@ramonclaudio/dvt-119-eas-config-mode-handoff
Draft

[build-tools] Use production mode for app config, prebuild, and Expo Doctor#4180
ramonclaudio wants to merge 11 commits into
mainfrom
@ramonclaudio/dvt-119-eas-config-mode-handoff

Conversation

@ramonclaudio

@ramonclaudio ramonclaudio commented Aug 12, 2026

Copy link
Copy Markdown
Member

Why

EAS Build can use an existing NODE_ENV when loading app config or running Expo commands, which can make it load different env files for the same build.

How

I updated EAS Build to use production mode for app config, prebuild, and Expo Doctor and kept the users env for dep installs.

Test Plan

Tests and CI checks pass.

@linear-code

linear-code Bot commented Aug 12, 2026

Copy link
Copy Markdown

DVT-119

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.68%. Comparing base (b03d315) to head (e3e4ea2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4180      +/-   ##
==========================================
+ Coverage   63.54%   63.68%   +0.14%     
==========================================
  Files        1028     1030       +2     
  Lines       47054    47088      +34     
  Branches     9891     9894       +3     
==========================================
+ Hits        29898    29982      +84     
+ Misses      17055    17005      -50     
  Partials      101      101              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ramonclaudio
ramonclaudio force-pushed the @ramonclaudio/dvt-119-eas-config-mode-handoff branch from 0822cb4 to bdc5d2b Compare August 13, 2026 13:48
@ramonclaudio ramonclaudio changed the title [build-tools] Use production mode for Expo commands during EAS Build [build-tools] Use production mode for app config, prebuild, and Expo Doctor Aug 13, 2026
@ramonclaudio ramonclaudio changed the title [build-tools] Use production mode for app config, prebuild, and Expo Doctor [build-tools][eas-cli] Use production mode for Expo commands Aug 16, 2026
@ramonclaudio ramonclaudio changed the title [build-tools][eas-cli] Use production mode for Expo commands [build-tools] Use production mode for app config, prebuild, and Expo Doctor Aug 16, 2026
@ramonclaudio
ramonclaudio force-pushed the @ramonclaudio/dvt-119-eas-config-mode-handoff branch from ad8a21c to 0822cb4 Compare August 16, 2026 14:13
ramonclaudio added a commit to expo/expo that referenced this pull request Aug 17, 2026
# Why

The EAS changes in [#4180](expo/eas-cli#4180)
tell Expo to use development or production mode when loading app config,
so we needed a temporary internal environment variable that Expo reads
and removes before app config loads.

# How

I added `__EXPO_CONFIG_MODE` as an internal handoff that `@expo/env`
reads and removes before Expo loads the dotenv files and app config. I
blocked `.env` files from setting the handoff and updated
`getOriginalEnv()` and `getOriginalEnvValue()` to exclude dotenv values
inherited from a parent process. We still use `EAS_BUILD` as the
production fallback for older EAS versions.

# Test Plan

Tests and package checks pass.

# Checklist

- [x] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
@ramonclaudio
ramonclaudio force-pushed the @ramonclaudio/dvt-119-eas-config-mode-handoff branch from 0822cb4 to e3e4ea2 Compare August 18, 2026 22:23
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@ramonclaudio
ramonclaudio deleted the @ramonclaudio/dvt-119-eas-config-mode-handoff branch August 18, 2026 22:51
@ramonclaudio
ramonclaudio restored the @ramonclaudio/dvt-119-eas-config-mode-handoff branch August 18, 2026 22:54
@ramonclaudio ramonclaudio reopened this Aug 18, 2026
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

Successfully merging this pull request may close these issues.

1 participant