-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move metro-config package into monorepo build, enable TS generation (#…
…41836) Summary: This adds `react-native/metro-config` to the monorepo build tool and emits the missing typescript declarations. Right now, we do have typescript declarations on `metro-config`, but not `react-native/metro-config`. Which makes everything a bit harder extend from "[the default React Native metro config](#36502)" in Expo. > Note, I also added the same `exports` block from `react-native/dev-middleware` for conformity. One open question here is, why aren't we exporting _all_ helper functions from `metro-config`? To me, its a bit weird that we need both `metro-config` _and_ `react-native/metro-config` as `loadConfig` isn't exported. ## Changelog: [INTERNAL] [FIXED] - Emit typescript declaration files for `react-native/metro-config` Pull Request resolved: #41836 Test Plan: Run the build tool, and check if the typescript declarations are emitted for `react-native/metro-config`. ``` yarn build metro-config ``` Reviewed By: hoxyq Differential Revision: D51943453 Pulled By: huntie fbshipit-source-id: cfaffe5660053fc9a9fcbe3dacf7f6ccc2bde01b
- Loading branch information
1 parent
49c3c34
commit b41a33e
Showing
5 changed files
with
48 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Build output | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* 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. | ||
* | ||
* @flow | ||
* @format | ||
* @oncall react_native | ||
*/ | ||
|
||
/*:: | ||
export type * from './index.flow'; | ||
*/ | ||
|
||
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) { | ||
require('../../../scripts/build/babel-register').registerForMonorepo(); | ||
} | ||
|
||
export * from './index.flow'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters