fix(react-native): fix react native npm preset (#16624)

This commit is contained in:
Emily Xiong 2023-04-28 14:34:39 -04:00 committed by GitHub
parent 08ecd81e61
commit 828f77a543
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 1 deletions

View File

@ -39,6 +39,7 @@ export function runCliBuild(
['build', ...createDetoxBuildOptions(options)],
{
cwd: join(workspaceRoot, projectRoot),
env: process.env,
}
);

View File

@ -63,6 +63,7 @@ function runCliTest(
['test', ...createDetoxTestOptions(options)],
{
cwd: join(workspaceRoot, projectRoot),
env: process.env,
}
);

View File

@ -28,6 +28,7 @@ export function withNxMetro(config: any, opts: WithNxOptions = {}) {
watchFolders = watchFolders.concat([
join(workspaceRoot, 'node_modules'),
join(workspaceRoot, workspaceLayout().libsDir),
join(workspaceRoot, 'packages'),
]);
if (opts.watchFolders?.length) {
watchFolders = watchFolders.concat(opts.watchFolders);

View File

@ -28,6 +28,7 @@ export function withNxMetro(config: any, opts: WithNxOptions = {}) {
watchFolders = watchFolders.concat([
join(workspaceRoot, 'node_modules'),
join(workspaceRoot, workspaceLayout().libsDir),
join(workspaceRoot, 'packages'),
join(workspaceRoot, '.storybook'),
]);
if (opts.watchFolders?.length) {

View File

@ -82,7 +82,7 @@ function runCliBuildIOS(
*/
childProcess = fork(
join(workspaceRoot, './node_modules/react-native/cli.js'),
['run-ios', ...createBuildIOSOptions(options), '--no-packager'],
['build-ios', ...createBuildIOSOptions(options), '--no-packager'],
{
cwd: join(workspaceRoot, projectRoot),
env: { ...process.env, RCT_METRO_PORT: options.port.toString() },