diff --git a/scripts/react-native-xcode.sh b/scripts/react-native-xcode.sh index e9ddec0c304bf9..3ef9a71bb9c58b 100755 --- a/scripts/react-native-xcode.sh +++ b/scripts/react-native-xcode.sh @@ -117,7 +117,7 @@ fi BUNDLE_FILE="$CONFIGURATION_BUILD_DIR/main.jsbundle" -EXTRA_ARGS=() +EXTRA_ARGS= case "$PLATFORM_NAME" in "macosx") @@ -144,12 +144,12 @@ if [[ $EMIT_SOURCEMAP == true ]]; then else PACKAGER_SOURCEMAP_FILE="$SOURCEMAP_FILE" fi - EXTRA_ARGS+=("--sourcemap-output" "$PACKAGER_SOURCEMAP_FILE") + EXTRA_ARGS="$EXTRA_ARGS --sourcemap-output $PACKAGER_SOURCEMAP_FILE" fi # Hermes doesn't require JS minification. if [[ $USE_HERMES == true && $DEV == false ]]; then - EXTRA_ARGS+=("--minify" "false") + EXTRA_ARGS="$EXTRA_ARGS --minify false" fi "$NODE_BINARY" $NODE_ARGS "$CLI_PATH" $BUNDLE_COMMAND \ @@ -160,8 +160,8 @@ fi --reset-cache \ --bundle-output "$BUNDLE_FILE" \ --assets-dest "$DEST" \ - "${EXTRA_ARGS[@]}" \ - "${EXTRA_PACKAGER_ARGS[@]}" + $EXTRA_ARGS \ + $EXTRA_PACKAGER_ARGS if [[ $USE_HERMES != true ]]; then cp "$BUNDLE_FILE" "$DEST/"