-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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(cli): auto enable --dev-client in npx expo start
#22926
Conversation
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
| <kbd>M</kbd> | Open the dev menu on any connected native device (web not supported). | | ||
| <kbd>Shift</kbd> + <kbd>M</kbd> | Choose more commands to trigger on connected devices.<br/>This includes toggling the performance monitor, opening the element inspector, reloading the device, and opening the dev menu. | | ||
| <kbd>J</kbd> | Open Chrome Dev Tools for any connected device that is using Hermes as the JavaScript engine. [Learn more](/guides/using-hermes#javascript-inspector-for-hermes). | | ||
| <kbd>O</kbd> | Open project code in your editor. This can be configured with the `EXPO_EDITOR` and `EDITOR` [environment variables](#environment-variables). | | ||
| <kbd>E</kbd> | Show the development server URL as a QR code in the terminal. | | ||
| <kbd>?</kbd> | Show all Terminal UI commands. | | ||
|
||
### Launch target | ||
|
||
The `npx expo start` command will automatically launch the app in Expo Go unless `expo-dev-client` in installed in the project, in which case it will open in the custom app. You can force the launch target by passing the `--dev-client` and `--go` flags. For example, running `npx expo start --go` will always launch the app in Expo Go, and `npx expo start --dev-client` will always attempt to launch the app in a development build. |
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.
the case this doesn't handle is a native app without expo-dev-client. npx expo start
in a react-native app w/ ios and android directories probably shouldn't default to expo go
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.
it's fine for now as this is the existing behavior and we don't break anything by merging new functionality for a different case. If users are doing development in an unintended way, then they may need to pass an additional flag (already the default), or switch the mode by pressing s
.
Why
--dev-client
whenexpo-dev-client
is in the projectpackage.json
. Users can swap to Expo Go withs
or pass--go
to ensure Expo Go is the default target.Test Plan