Skip to content

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

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

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
@facebook-github-tools facebook-github-tools Bot added 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. labels Aug 12, 2026
@retyui

retyui commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

@robhogan Since you reviewed a previous PR, this one might also be a good candidate for your review, if you have a chance. Thanks!

@retyui

retyui commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Will be great to merge it before 0.88.x release

@robhogan

robhogan commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

This LGTM but I'm not at Meta any more. @cortinico ?

@meta-codesync

meta-codesync Bot commented Sep 8, 2026

Copy link
Copy Markdown

@cortinico has imported this pull request. If you are a Meta employee, you can view this in D119189290.

@meta-codesync meta-codesync Bot closed this in 97bea46 Sep 9, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Sep 9, 2026
@meta-codesync

meta-codesync Bot commented Sep 9, 2026

Copy link
Copy Markdown

@cortinico merged this pull request in 97bea46.

@retyui

retyui commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@cortinico thank you !

@retyui
retyui deleted the fix/retyui/hermes-stable-2 branch September 9, 2026 10:53
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. Merged This PR has been merged. 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.

2 participants