Set up .flowconfig to support Haste and path-based imports (#24318)

Summary:
See https://github.com/facebook/react-native/issues/24316 for the motivation.

By adding the .android.js and .ios.js extensions to the respective .flowconfig files, Flow is able to find files that either:

- Are required using Haste
- Are required using standard paths and have a .js extension
- Are required using standard paths and have a .platform.js subextension

[General] [Changed] - Adjusted .flowconfig to support both Haste and standard path-based requires
Pull Request resolved: https://github.com/facebook/react-native/pull/24318

Differential Revision: D14822356

Pulled By: cpojer

fbshipit-source-id: dde0c83692d6170f4a44cd3fb8ede162054157e9
This commit is contained in:
James Ide 2019-04-08 13:20:03 -07:00 committed by Facebook Github Bot
parent c46ca60e3f
commit 682e11a899
2 changed files with 8 additions and 0 deletions

View File

@ -44,6 +44,10 @@ emoji=true
esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable
module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js
module.system=haste
module.system.haste.use_name_reducers=true
# keep the following in sync with server/haste/hasteImpl.js

View File

@ -44,6 +44,10 @@ emoji=true
esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable
module.file_ext=.js
module.file_ext=.json
module.file_ext=.android.js
module.system=haste
module.system.haste.use_name_reducers=true
# keep the following in sync with server/haste/hasteImpl.js