The source maps for Expo CLI are off by 1, but only in development. The cause is that source maps are generated differently between the server endpoint and the build function. In the Expo metro-config, we use the serializer to inject custom pre-modules for things like SSR and client-side environment variables. These changes aren't reflected in the source map endpoint.
This PR addresses the differences by applying a custom serializer to the graph if one exists, and returning the map from the serializer if one is returned.
Summary
build
function. In the Expo metro-config, we use the serializer to inject custom pre-modules for things like SSR and client-side environment variables. These changes aren't reflected in the source map endpoint.Changelog: [Fix] Apply custom serializer to source map graph in
.map
endpoint.