Skip to content

Change default transform profile to 'hermes-stable' #2 - #57911

Open
retyui wants to merge 1 commit into
react:mainfrom
retyui:fix/retyui/hermes-stable-2
Open

Change default transform profile to 'hermes-stable' #2#57911
retyui wants to merge 1 commit into
react:mainfrom
retyui:fix/retyui/hermes-stable-2

Conversation

@retyui

@retyui retyui commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary:

Issue: #57174
Initially, this PR was created to fix an issue above: #57208


But after re-testing it on the latest React Native 0.87.x.
I found out that cli set unstable_transformProfile value to default (cli -> metro -> babel -> @rn/babel-preset)

function getTransformProfile(caller) {
  return caller?.unstable_transformProfile ?? 'hermes-stable';
                 ^^^ has a 'default' value (from CLI)
}

So, isHermesProfile is always false here:

and unnecessary babel plugins has applied

Changelog:

[GENERAL] [CHANGED] - Change default transform profile to 'hermes-stable'

Test Plan:

npx @react-native-community/cli init --pm yarn RN87
cd RN87
open node_modules/@react-native/babel-preset/src/configs/main.js
// add Logs to print (isHermesProfile, transformProfile) vars

// Run build 
./android/gradlew -p android assembleRelease
// Check logs (have to be `isHermesProfile: false, transformProfile: 'default')

// Apply fix
open node_modules/@react-native/community-cli-plugin/dist/commands/bundle/index.js
// Find a `--unstable-transform-profile` option
// And change `default: "default",` => `default: "hermes-stable",`
 
 
 // Run build again

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 12, 2026
@retyui

retyui commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@robhogan Since you reviewed a prev. PR , this also might be good candidate

@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Callstack Partner: Callstack Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant