Closed EvanBacon closed 1 year ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
e2d6419
) 83.09% compared to head (a7ae0d4
) 83.09%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@robhogan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Apologies for the delay with this, I wanted to try this to make sure I understood how it all fits together - can confirm the root cause is incorrectly generated source (map) URLs, and this LGTM.
We use
unstable_serverRoot
heavily in Expo to support monorepos
I'm keen to promote some of these unstable_
features to stable given how load-bearing Expo's use makes them, but tbh I'm not totally sure what the concrete use case is for serverRoot
in new projects.
Why not set projectRoot
to the workspace root instead?
@robhogan merged this pull request in facebook/metro@402dc0b327a0ac9eabf4280b514f9e35254110c7.
Summary
We use unstable_serverRoot heavily in Expo to support monorepos and consistently have issues where saving a file will log an error in the console:
This is because the HMR
sourceMappingURL
is being calculated relative to the projectRoot instead of the serverRoot, but all files are being resolved relative to the serverRoot.