This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
[xdl] fix expo export --dump-sourcemap for sdk 40+ and bare projects #3095
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes expo/expo#11652
Currently, JS bundles created from
expo export --dump-sourcemap
do not run in an SDK 40 bare project -- they fail with the familiarModule AppRegistry is not a registered callable module
error. The cause seems to be the following lines:expo-cli/packages/xdl/src/Project.ts
Lines 495 to 496 in 62339b5
The line that's being truncated is:
The bundles run fine without this line truncated. Since I'm not sure of the context/reasoning around truncating this line in the first place, I've simply added a gate that doesn't truncate for SDK 40+ bare projects.
Test plan
expo export --dump-sourcemap
loads and runssourceMappingURL
present in the bundle (the one added right below the relevant code in expo-cli):@quinlanj , adding you as a reviewer just in case you remember any context around this from 2 years ago 😅