react-native/scripts/build
Blake Friedman b38f80aeb6 update shared build to strip Babel wrapper (#44339)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44339

We require the wrapper code for in repository calls to these packages directly from node (i.e. using CommonJS).  This wrapper code typically sits at the entrypoint of the build packages (i.e. `index.js`).

NOTE: This unblocks an issue preventing me from landing further work on the `helloworld` cli replacing the community template.

## Problem:
The [flow-api-translator](https://www.npmjs.com/package/flow-api-translator) library doesn't allow CommonJS `module.exports` when generating TypeScript Type Defintions.

## Change
1. At the built time, this strips out our wrapper code and sets up the dist/ folder appropriately for npm distribution.
2. Updated the `package.json` files to consistently share Flow types

Changelog: [Internal] refactor build packages output to remove wrapper.

NOTE: Added better error messages when users deviated from the current pattern:
{F1501571608}

Reviewed By: huntie

Differential Revision: D56762162

fbshipit-source-id: f110b31e4ad780998dbc81a2482891ac8d8c6458
2024-05-02 04:00:21 -07:00
..
babel Flow strictify xplat/js/react-native-github where possible (#41051) 2023-10-18 05:36:33 -07:00
babel-register.js Babel-ignore node_modules on Windows consistently with others (#42681) 2024-01-27 06:49:15 -08:00
build.js update shared build to strip Babel wrapper (#44339) 2024-05-02 04:00:21 -07:00
clean.js Enable lint/sort-imports everywhere (#41334) 2023-11-06 12:59:38 -08:00
config.js remove from build script (#44233) 2024-04-24 03:53:34 -07:00