Skip to content

[RFC] Update Community CLI plugin dependencies (0.89 changes) - #235

Merged
huntie merged 1 commit into
react-native-community:mainfrom
huntie:rfc-explicit-core-cli-plugin
Sep 25, 2026
Merged

huntie merged 1 commit into
react-native-community:mainfrom
huntie:rfc-explicit-core-cli-plugin

Conversation

@huntie

@huntie huntie commented Jun 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Motivation: @react-native/community-cli-plugin is currently an unconditional dependency of react-native, even for Expo users.

  • Additionally, we maintain a CLI-coupled react-native.config.js file in the react-native package, which we can largely remove after these changes.
  • Pulling this plugin in implicitly is unnecessary when CLI has its own plugin discovery mechanism.

This change

  • Depend on @react-native/community-cli-plugin explicitly in the template, meaning we can drop the reference from core in React Native 0.87.
  • To make this more palatable for users, also bundle another proposed change in 0.87 — make cli-platform-android, cli-platform-ios builtin dependencies of the CLI.
    • I note that CLI was historically separated out into granular plugins. However, some plugins (e.g. cli-doctor) remain built in. Separating the core platforms provides little value when RN itself bundles both — match this baseline.
    • Prior art: Expo CLI doesn't bother separating these — the dev install impact on projects is negligible. No artifacts leak into the project.

Changelog:
[General][Breaking] - Update required Community CLI plugins

  • @react-native-community/cli-platform-android/cli-platform-ios are no longer required
  • @react-native/community-cli-plugin is now mandatory

Test Plan

TODO

@huntie
huntie marked this pull request as ready for review June 26, 2026 17:05
@thymikee

Copy link
Copy Markdown
Member

I think I'd be good with these changes. Curious what OOT platforms say: @Saadnajmi @acoates-ms

Comment thread template/package.json
@huntie

huntie commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

Deprioritising this until 0.89 or later.

@cortinico
cortinico marked this pull request as draft July 9, 2026 09:53
@cortinico cortinico changed the title [RFC] Update Community CLI plugin dependencies (0.87 changes) [RFC] Update Community CLI plugin dependencies (0.89 changes) Jul 9, 2026
@huntie

huntie commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator Author

Updated with user warning (@cortinico feedback, tested in react-native-community/cli#2817). Now open for review for the 0.89 cycle.

@huntie
huntie marked this pull request as ready for review September 24, 2026 14:09
@huntie
huntie force-pushed the rfc-explicit-core-cli-plugin branch from 6933476 to 033d146 Compare September 24, 2026 14:17
@huntie
huntie merged commit b7bdf26 into react-native-community:main Sep 25, 2026
1 check passed
@huntie
huntie deleted the rfc-explicit-core-cli-plugin branch September 25, 2026 12:51
meta-codesync Bot pushed a commit to react/react-native that referenced this pull request Sep 25, 2026
Summary:
Replaces #57352.

Self-register commands from the `community-cli-plugin` package via `react-native.config.js` — meaning we can remove the redirect within `packages/react-native/react-native.config.js`.

Progress towards removing `community-cli-plugin` as a direct dep of `react-native`, and paired with react-native-community/template#235.

RNTester and HelloWorld list `react-native/community-cli-plugin` in `devDependencies`, as the template now does (react-native-community/template#235).

Changelog:
[General][Breaking] - `react-native/community-cli-plugin` will no longer be auto-detected from `react-native`. It must now be specified in `devDependencies`.

Pull Request resolved: #58670

Test Plan:
Compared `react-native config` output with `react-native-community/cli` 20.2.0.

**RNTester**

- ✅ Commands, platforms, and project config are unchanged from `main`
- ✅ Removing the new `react-native/community-cli-plugin` devDependency drops `bundle`, `start`, `spm`, and `codegen`, so they are registered by plugin discovery

**Template-shaped app** (plugin in `devDependencies`, no project `react-native.config.js`)

- ✅ `bundle`, `start`, `spm`, and `codegen` are registered

Reviewed By: christophpurrer, cortinico

Differential Revision: D121634885

Pulled By: Abbondanzo

fbshipit-source-id: e97c9f820d3c597233ef4a7ddaaf1b752f1f7688
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants