-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tell template app .flowconfig to look for .native.js files #16816
Conversation
`metro-bundler` looks for `.native.js` files ([see here](https://github.com/facebook/metro-bundler/blob/master/packages/metro-bundler/src/node-haste/DependencyGraph/ModuleResolution.js#L458)). Packages such as `react-navigation` rely on this functionality ([see here](https://github.com/react-community/react-navigation/blob/master/src/PlatformHelpers.native.js)). This PR makes it so you can `react-native init`, `yarn add react-navigation`, and `flow` successfully! All four must be specified, since specifying any `module.file_ext` overrides the default three.
@gabelevi, any chance you could look at this? It's a small change to |
@calebmer, could I trouble you to look at this? It's a small change to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shergin is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: `metro-bundler` looks for `.native.js` files ([see here](https://github.com/facebook/metro-bundler/blob/master/packages/metro-bundler/src/node-haste/DependencyGraph/ModuleResolution.js#L458)). Packages such as `react-navigation` rely on this functionality ([see here](https://github.com/react-community/react-navigation/blob/master/src/PlatformHelpers.native.js)). This PR makes it so you can `react-native init`, `yarn add react-navigation`, and `flow` successfully! 1. `react-native init` 2. `yarn add react-navigation` 3. `flow` [CLI] [MINOR] [Flow] - Tell template app .flowconfig to look for .native.js files Closes facebook#16816 Differential Revision: D6445363 Pulled By: shergin fbshipit-source-id: c0ce7ed27a8a3291deaa09d98e822362f93929c8
Summary: `metro-bundler` looks for `.native.js` files ([see here](https://github.com/facebook/metro-bundler/blob/master/packages/metro-bundler/src/node-haste/DependencyGraph/ModuleResolution.js#L458)). Packages such as `react-navigation` rely on this functionality ([see here](https://github.com/react-community/react-navigation/blob/master/src/PlatformHelpers.native.js)). This PR makes it so you can `react-native init`, `yarn add react-navigation`, and `flow` successfully! 1. `react-native init` 2. `yarn add react-navigation` 3. `flow` [CLI] [MINOR] [Flow] - Tell template app .flowconfig to look for .native.js files Closes facebook#16816 Differential Revision: D6445363 Pulled By: shergin fbshipit-source-id: c0ce7ed27a8a3291deaa09d98e822362f93929c8
Summary: `metro-bundler` looks for `.native.js` files ([see here](https://github.com/facebook/metro-bundler/blob/master/packages/metro-bundler/src/node-haste/DependencyGraph/ModuleResolution.js#L458)). Packages such as `react-navigation` rely on this functionality ([see here](https://github.com/react-community/react-navigation/blob/master/src/PlatformHelpers.native.js)). This PR makes it so you can `react-native init`, `yarn add react-navigation`, and `flow` successfully! 1. `react-native init` 2. `yarn add react-navigation` 3. `flow` [CLI] [MINOR] [Flow] - Tell template app .flowconfig to look for .native.js files Closes facebook/react-native#16816 Differential Revision: D6445363 Pulled By: shergin fbshipit-source-id: c0ce7ed27a8a3291deaa09d98e822362f93929c8
Motivation
metro-bundler
looks for.native.js
files (see here). Packages such asreact-navigation
rely on this functionality (see here). This PR makes it so you canreact-native init
,yarn add react-navigation
, andflow
successfully!Test Plan
react-native init
yarn add react-navigation
flow
Release Notes
[CLI] [MINOR] [Flow] - Tell template app .flowconfig to look for .native.js files