Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/community-cli-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
}
},
"files": [
"dist"
"dist",
"react-native.config.js"
],
"scripts": {
"prepack": "node ../../scripts/build/prepack.js"
Expand Down
20 changes: 20 additions & 0 deletions packages/community-cli-plugin/react-native.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @noflow
*/

const {
bundleCommand,
codegenCommand,
spmCommand,
startCommand,
} = require('@react-native/community-cli-plugin');

module.exports = {
commands: [bundleCommand, startCommand, spmCommand, codegenCommand],
};
14 changes: 2 additions & 12 deletions packages/react-native/react-native.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ import type {Command} from '@react-native-community/cli-types';
// IMPORTANT: This is a routing file only. Do NOT add new command
// definitions or implementations here.
//
// New CLI commands belong in @react-native/community-cli-plugin, and
// may (temporarily) be imported and registered here.
// CLI commands belong in @react-native/community-cli-plugin, which registers
// them via its own react-native.config.js.
//
// Future state: The Community Template should directly depend on and inject:
// - @react-native-community/cli-platform-android
// - @react-native-community/cli-platform-ios
// - @react-native/community-cli-plugin

const verbose = Boolean(process.env.DEBUG?.includes('react-native'));

Expand Down Expand Up @@ -72,15 +71,6 @@ try {

const commands /*: Array<Command> */ = [];

const {
bundleCommand,
codegenCommand,
spmCommand,
startCommand,
} = require('@react-native/community-cli-plugin');

commands.push(bundleCommand, startCommand, spmCommand, codegenCommand);

const config = {
commands,
platforms: {} /*:: as {[string]: Readonly<{
Expand Down
1 change: 1 addition & 0 deletions packages/rn-tester/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"@react-native-community/cli": "20.2.0",
"@react-native-community/cli-platform-android": "20.2.0",
"@react-native-community/cli-platform-ios": "20.2.0",
"@react-native/community-cli-plugin": "0.87.0-main",
"@react-native/core-cli-utils": "*",
"commander": "^12.0.0",
"listr2": "^6.4.1",
Expand Down
1 change: 1 addition & 0 deletions private/helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native/babel-preset": "0.87.0-main",
"@react-native/community-cli-plugin": "0.87.0-main",
"@react-native/core-cli-utils": "*",
"@react-native/eslint-config": "0.87.0-main",
"@react-native/jest-preset": "0.87.0-main",
Expand Down
Loading