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

feat(cli): support customizing the Metro resolver #25148

Merged
merged 22 commits into from Nov 3, 2023

Conversation

EvanBacon
Copy link
Contributor

@EvanBacon EvanBacon commented Oct 31, 2023

Why

This PR adds the ability for users to chain the Metro resolver in their metro.config.js in order to customize file resolution.

How

  • Refactor custom resolving to support a user-defined resolver that runs before Expo CLI's resolver.
  • Mutate the context ahead of time to ensure users have access to the multi-platform settings that we'll resolve against.
  • Update the docs with a bunch of tips and tricks I wish I knew years ago.
  • Move the expo-router AppContainer shim to expo/cli.
  • Restructure resolution cases to prevent plugin-based conventions from leaking into each other. For example, Node.js external shims are no longer tested against tsconfig path aliases.

Test Plan

  • Updated unit tests to cover existing behavior better.

Checklist

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Oct 31, 2023
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Oct 31, 2023
@expo-bot expo-bot added bot: needs changes ExpoBot found things that don't meet our guidelines and removed bot: passed checks ExpoBot has nothing to complain about labels Nov 1, 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: needs changes ExpoBot found things that don't meet our guidelines labels Nov 2, 2023
@EvanBacon EvanBacon merged commit 38019cf into main Nov 3, 2023
16 of 17 checks passed
@EvanBacon EvanBacon deleted the @evanbacon/cli/chain-resolver branch November 3, 2023 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed 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