Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[xdl] Switch to in-process Metro JS bundling starting from SDK 40 #2921

Merged
merged 1 commit into from
Nov 19, 2020

Conversation

fson
Copy link
Contributor

@fson fson commented Nov 19, 2020

Always use in-process Metro (@expo/dev-server) for SDK 40 and newer. Metro is used to bundle JS in expo start , expo publish and expo export commands. @expo/dev-server is a rewrite of the interface between Expo CLI and Metro bundler that uses the JS APIs of Metro (instead of running React Native CLI as a subprocess) to make bundling faster and handling Metro configurations more predictable.

For older SDK versions, keep the old behavior (in-process Metro can be enabled by setting EXPO_USE_DEV_SERVER=true in the environment).

This is not a breaking change because the behavior for already released SDKs stays the same and all SDK 40 testing is done using in-process Metro.

Fixes #2322.

Always use in-process Metro for SDK 40 and newer.

For older SDK versions, keep the old behavior (in-process Metro can be
enabled by setting `EXPO_USE_DEV_SERVER=true` in the environment).
Copy link
Contributor

@EvanBacon EvanBacon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, runs as expected.

@EvanBacon EvanBacon added enhancement New feature or request 🧹 chore labels Nov 19, 2020
@fson fson merged commit 4ece18c into master Nov 19, 2020
@fson fson deleted the @fson/use-dev-server-by-default branch November 19, 2020 22:09
@thgh
Copy link

thgh commented Nov 30, 2020

I just tried to run expo start with EXPO_USE_DEV_SERVER=true and got this error: (SDK39 so probably not relevant)

Error: [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧹 chore enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable in-process dev server / Metro bundler interface by default
3 participants