fix(react-native): fix react native npm preset (#16624)
This commit is contained in:
parent
08ecd81e61
commit
828f77a543
@ -39,6 +39,7 @@ export function runCliBuild(
|
|||||||
['build', ...createDetoxBuildOptions(options)],
|
['build', ...createDetoxBuildOptions(options)],
|
||||||
{
|
{
|
||||||
cwd: join(workspaceRoot, projectRoot),
|
cwd: join(workspaceRoot, projectRoot),
|
||||||
|
env: process.env,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -63,6 +63,7 @@ function runCliTest(
|
|||||||
['test', ...createDetoxTestOptions(options)],
|
['test', ...createDetoxTestOptions(options)],
|
||||||
{
|
{
|
||||||
cwd: join(workspaceRoot, projectRoot),
|
cwd: join(workspaceRoot, projectRoot),
|
||||||
|
env: process.env,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,7 @@ export function withNxMetro(config: any, opts: WithNxOptions = {}) {
|
|||||||
watchFolders = watchFolders.concat([
|
watchFolders = watchFolders.concat([
|
||||||
join(workspaceRoot, 'node_modules'),
|
join(workspaceRoot, 'node_modules'),
|
||||||
join(workspaceRoot, workspaceLayout().libsDir),
|
join(workspaceRoot, workspaceLayout().libsDir),
|
||||||
|
join(workspaceRoot, 'packages'),
|
||||||
]);
|
]);
|
||||||
if (opts.watchFolders?.length) {
|
if (opts.watchFolders?.length) {
|
||||||
watchFolders = watchFolders.concat(opts.watchFolders);
|
watchFolders = watchFolders.concat(opts.watchFolders);
|
||||||
|
|||||||
@ -28,6 +28,7 @@ export function withNxMetro(config: any, opts: WithNxOptions = {}) {
|
|||||||
watchFolders = watchFolders.concat([
|
watchFolders = watchFolders.concat([
|
||||||
join(workspaceRoot, 'node_modules'),
|
join(workspaceRoot, 'node_modules'),
|
||||||
join(workspaceRoot, workspaceLayout().libsDir),
|
join(workspaceRoot, workspaceLayout().libsDir),
|
||||||
|
join(workspaceRoot, 'packages'),
|
||||||
join(workspaceRoot, '.storybook'),
|
join(workspaceRoot, '.storybook'),
|
||||||
]);
|
]);
|
||||||
if (opts.watchFolders?.length) {
|
if (opts.watchFolders?.length) {
|
||||||
|
|||||||
@ -82,7 +82,7 @@ function runCliBuildIOS(
|
|||||||
*/
|
*/
|
||||||
childProcess = fork(
|
childProcess = fork(
|
||||||
join(workspaceRoot, './node_modules/react-native/cli.js'),
|
join(workspaceRoot, './node_modules/react-native/cli.js'),
|
||||||
['run-ios', ...createBuildIOSOptions(options), '--no-packager'],
|
['build-ios', ...createBuildIOSOptions(options), '--no-packager'],
|
||||||
{
|
{
|
||||||
cwd: join(workspaceRoot, projectRoot),
|
cwd: join(workspaceRoot, projectRoot),
|
||||||
env: { ...process.env, RCT_METRO_PORT: options.port.toString() },
|
env: { ...process.env, RCT_METRO_PORT: options.port.toString() },
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user