Cleanup temporary files after source map generation.

Summary:
Changelog:
[iOS][Fixed] - When source maps are enabled, clean up temporary files from the build directory. Reduces bundle size by at least 1MB.

Reviewed By: cipolleschi

Differential Revision: D38866158

fbshipit-source-id: 0f46faf4e767bb7417b24f283fbe19cfa022941a
This commit is contained in:
Dmitry Rykun 2022-08-19 10:23:22 -07:00 committed by Facebook GitHub Bot
parent 61106ac680
commit e0a71fc7b5

View File

@ -170,6 +170,8 @@ else
if [[ $EMIT_SOURCEMAP == true ]]; then
HBC_SOURCEMAP_FILE="$DEST/main.jsbundle.map"
"$NODE_BINARY" "$COMPOSE_SOURCEMAP_PATH" "$PACKAGER_SOURCEMAP_FILE" "$HBC_SOURCEMAP_FILE" -o "$SOURCEMAP_FILE"
rm "$HBC_SOURCEMAP_FILE"
rm "$PACKAGER_SOURCEMAP_FILE"
fi
BUNDLE_FILE="$DEST/main.jsbundle"
fi