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 react-native-web alias for metro web that doesn't rely on Babel #20828

Merged
merged 3 commits into from Jan 13, 2023

Conversation

EvanBacon
Copy link
Contributor

Why

  • If you disable Babel (e.g. in exotic mode) then the fallback system doesn't work (it effectively never "works").

How

  • Simply remap react-native to react-native-web when resolving for the web.

Test Plan

EXPO_USE_EXOTIC=1 nexpo -c -w -> Works (never attempts to access react-native/index.js)

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jan 13, 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 Jan 13, 2023
@EvanBacon EvanBacon merged commit 96b8327 into main Jan 13, 2023
@EvanBacon EvanBacon deleted the @evanbacon/cli/metro-web-alias branch January 13, 2023 16:00
byCedric pushed a commit that referenced this pull request Jan 17, 2023
…on Babel (#20828)

# Why

- If you disable Babel (e.g. in exotic mode) then the fallback system
doesn't work (it effectively never "works").

# How

- Simply remap `react-native` to `react-native-web` when resolving for
the web.
 
<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

`EXPO_USE_EXOTIC=1 nexpo -c -w` -> Works (never attempts to access
`react-native/index.js`)

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants