Files
react-native/private/helloworld/scripts/metro.js
Riccardo Cipolleschi 9d4f6cd6b5 Fix path to react-native for Metro (#52877)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52877

We moved the HelloWorld package from `packages`to `private` but we didn't update the path to React Native that is consumed by metro.

This change fixes this.

## Changelog:
[Internal] -

Reviewed By: huntie

Differential Revision: D78493478

fbshipit-source-id: 8795c2963dec036693a73a16c18be381f19e11c4
2025-07-28 10:32:44 -07:00

37 lines
917 B
JavaScript

/**
* 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 {startCommand} = require('@react-native/community-cli-plugin');
const {program} = require('commander');
const path = require('path');
program
.description('Starts the React Native Metro bundler for internal testing app')
.action(async options => {
await startCommand.func(
[],
{
platforms: {
ios: {},
android: {},
},
root: path.join(__dirname, '../'),
reactNativePath: path.join(__dirname, '../../../packages/react-native'),
},
{
experimentalDebugger: false,
interactive: false,
projectRoot: options.projectRoot,
platforms: ['ios', 'android'],
},
);
})
.parse();