-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat(eas-cli): expose expo export dev flag as an option in eas update #2050
Conversation
@@ -208,6 +210,7 @@ export async function buildBundlesAsync({ | |||
'--dump-sourcemap', | |||
'--dump-assetmap', | |||
`--platform=${platformFlag}`, | |||
...(dev ? ['--dev'] : []), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this flag exists on the legacy Expo CLI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## main #2050 +/- ##
==========================================
- Coverage 53.98% 53.97% -0.01%
==========================================
Files 508 508
Lines 18593 18600 +7
Branches 3909 3915 +6
==========================================
+ Hits 10036 10037 +1
- Misses 8537 8543 +6
Partials 20 20
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some nits, otherwise lgtm!
@@ -208,6 +210,7 @@ export async function buildBundlesAsync({ | |||
'--dump-sourcemap', | |||
'--dump-assetmap', | |||
`--platform=${platformFlag}`, | |||
...(dev ? ['--dev'] : []), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Quinlan Jung <[email protected]>
@nderscore - can you manually add an entry to https://github.com/expo/eas-cli/blob/main/CHANGELOG.md Then we can go ahead an merge! |
@wschurman sorry for missing that part of the contributing docs! 😅 Updated with a change log entry. |
Thanks for the contribution! |
Why
When
__DEV__
is unset orfalse
, expo-dev-menu'sregisterDevMenuItems
option is a no-op.In order to be able to use custom expo-dev-menu menu items in updates/previews for a debug build, it is necessary for the
__DEV__
global variable to be set totrue
in the generated updates and preview bundles.EAS does not currently expose the
--dev
option from Expo CLI'sexport
command, which is what determines whether or not__DEV__
gets stripped during bundling.How
Adds a new CLI flag (
--dev
) to theeas update
command.When set, an additional CLI argument
--dev
is passed toexpo export
.Test Plan
I tested this in my own project and it successfully deployed an update where
__DEV__
is set to true and my custom dev menu items are being registered correctly.