diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 966a8e8385d..e78407a4513 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -25,7 +25,8 @@ } }, "files": [ - "dist" + "dist", + "react-native.config.js" ], "scripts": { "prepack": "node ../../scripts/build/prepack.js" diff --git a/packages/community-cli-plugin/react-native.config.js b/packages/community-cli-plugin/react-native.config.js new file mode 100644 index 00000000000..6d3241d4b1a --- /dev/null +++ b/packages/community-cli-plugin/react-native.config.js @@ -0,0 +1,18 @@ +/** + * 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, + startCommand, +} = require('@react-native/community-cli-plugin'); + +module.exports = { + commands: [bundleCommand, startCommand], +}; diff --git a/packages/react-native/react-native.config.js b/packages/react-native/react-native.config.js index 71329023116..ec16dec0dab 100644 --- a/packages/react-native/react-native.config.js +++ b/packages/react-native/react-native.config.js @@ -70,13 +70,6 @@ try { const commands /*: Array */ = []; -const { - bundleCommand, - startCommand, -} = require('@react-native/community-cli-plugin'); - -commands.push(bundleCommand, startCommand); - const codegenCommand /*: Command */ = { name: 'codegen', options: [