diff --git a/packages/community-cli-plugin/src/commands/codegen.js b/packages/community-cli-plugin/src/commands/codegen.js index cb158a1e8bb6..20e7e021c32f 100644 --- a/packages/community-cli-plugin/src/commands/codegen.js +++ b/packages/community-cli-plugin/src/commands/codegen.js @@ -47,7 +47,7 @@ const codegenCommand: Command = { args: CodegenCommandArgs, ): void => { const generateArtifactsExecutor = require.resolve( - 'react-native/scripts/codegen/generate-artifacts-executor', + 'react-native/scripts/codegen/generate-artifacts-executor/index', {paths: [config.root]}, ); // $FlowFixMe[unsupported-syntax] dynamic require of a resolved path diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 091d8770a40b..9ba6a5668473 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -42,7 +42,9 @@ "types": null, "default": "./Libraries/*.js" }, - "./scripts/*": "./scripts/*", + "./scripts/*": "./scripts/*.js", + "./scripts/*.sh": "./scripts/*.sh", + "./scripts/*.rb": "./scripts/*.rb", "./asset-registry": { "types": null, "default": "./src/asset-registry.js" diff --git a/private/core-cli-utils/src/private/app.js b/private/core-cli-utils/src/private/app.js index 6329affb9598..ce85a3c533d8 100644 --- a/private/core-cli-utils/src/private/app.js +++ b/private/core-cli-utils/src/private/app.js @@ -187,7 +187,7 @@ const bundleApp = ( 'Check if SourceMap script available', () => { composeSourceMaps = getNodePackagePath( - 'react-native/scripts/compose-source-maps.js', + 'react-native/scripts/compose-source-maps', ); }, );