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

fix(cli): Add fallback error for static rendering #23170

Merged
merged 3 commits into from Jun 28, 2023

Conversation

EvanBacon
Copy link
Contributor

Why

If you attempt to static render without Expo Router then things could go wrong, this adds a fallback error message in development to try and make things more clear.

Test Plan

  • In a project without Expo Router (@expo/metro-runtime), enable Metro web and static output, then add an import error.

@EvanBacon EvanBacon requested a review from byCedric as a code owner June 28, 2023 18:28
@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jun 28, 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 Jun 28, 2023
@EvanBacon EvanBacon merged commit e24c47a into main Jun 28, 2023
5 checks passed
@EvanBacon EvanBacon deleted the @evanbacon/cli/static-rendering-error-fallback branch June 28, 2023 21:47
EvanBacon added a commit that referenced this pull request Jun 28, 2023
# Why

If you attempt to static render without Expo Router then things could go
wrong, this adds a fallback error message in development to try and make
things more clear.

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# Test Plan

- In a project without Expo Router (`@expo/metro-runtime`), enable Metro
web and static output, then add an import error.

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
@brentvatne brentvatne added the published Changes from the PR have been published to npm label Jun 29, 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 published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants