Skip to content

Commit

Permalink
Cleanup temporary files after source map generation.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Dmitry Rykun authored and facebook-github-bot committed Aug 19, 2022
1 parent 61106ac commit e0a71fc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/react-native-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e0a71fc

Please sign in to comment.