Skip to content

Commit

Permalink
Set up .flowconfig to support Haste and path-based imports (facebook#…
Browse files Browse the repository at this point in the history
…24318)

Summary:
See facebook#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: facebook#24318

Differential Revision: D14822356

Pulled By: cpojer

fbshipit-source-id: dde0c83692d6170f4a44cd3fb8ede162054157e9
  • Loading branch information
ide authored and dsyang committed Apr 12, 2019
1 parent d5b917f commit 314c490
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 314c490

Please sign in to comment.