mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 09:35:48 +00:00
6a838a4201
Summary: We don't (yet) treat these the same as any other modules because we still have special resolution rules for them in the packager allowing the use of `providesModule`, but I believe this allows people to use npm react in their RN projects and not have duplicate copies of React. Fixes facebook/react-native#2985. This relies on fbjs 0.6, which includes `.flow` files alongside the `.js` files to allow them to be typechecked without additional configuration. This also uses react 0.14.5, which shims a couple of files (as `.native.js`) to avoid DOM-specific bits. Once we fix these in React, we will use the same code on web and native. Hopefully we can also remove the packager support I'm adding here for `.native.js`. This diff is not the desired end state for us – ideally the packager would know nothing of react or fbjs, and we'll get there eventually by not relying on `providesModule` in order to load react and fbjs modules. (fbjs change posted here but not merged yet: https://github.com/facebook/fbjs/pull/84.) This should also allow relay to work seamlessly with RN, but I haven't verified this. public Reviewed By: sebmarkbage Differential Revision: D2786197 fb-gh-sync-id: ff50f28445e949edc9501f4b599df7970813870d
66 lines
1.7 KiB
Plaintext
66 lines
1.7 KiB
Plaintext
[ignore]
|
|
|
|
# We fork some components by platform.
|
|
.*/*.web.js
|
|
.*/*.android.js
|
|
|
|
# Some modules have their own node_modules with overlap
|
|
.*/node_modules/node-haste/.*
|
|
|
|
# Ugh
|
|
.*/node_modules/babel.*
|
|
.*/node_modules/babylon.*
|
|
.*/node_modules/invariant.*
|
|
|
|
# Ignore react and fbjs where there are overlaps, but don't ignore
|
|
# anything that react-native relies on
|
|
.*/node_modules/fbjs/lib/Map.js
|
|
.*/node_modules/fbjs/lib/Promise.js
|
|
.*/node_modules/fbjs/lib/fetch.js
|
|
.*/node_modules/fbjs/lib/ExecutionEnvironment.js
|
|
.*/node_modules/fbjs/lib/isEmpty.js
|
|
.*/node_modules/fbjs/lib/crc32.js
|
|
.*/node_modules/fbjs/lib/ErrorUtils.js
|
|
|
|
# Flow has a built-in definition for the 'react' module which we prefer to use
|
|
# over the currently-untyped source
|
|
.*/node_modules/react/react.js
|
|
.*/node_modules/react/lib/React.js
|
|
.*/node_modules/react/lib/ReactDOM.js
|
|
|
|
# Ignore commoner tests
|
|
.*/node_modules/commoner/test/.*
|
|
|
|
# See https://github.com/facebook/flow/issues/442
|
|
.*/react-tools/node_modules/commoner/lib/reader.js
|
|
|
|
# Ignore jest
|
|
.*/node_modules/jest-cli/.*
|
|
|
|
# Ignore Website
|
|
.*/website/.*
|
|
|
|
[include]
|
|
|
|
[libs]
|
|
Libraries/react-native/react-native-interface.js
|
|
|
|
[options]
|
|
module.system=haste
|
|
|
|
munge_underscores=true
|
|
|
|
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
|
|
module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub'
|
|
|
|
suppress_type=$FlowIssue
|
|
suppress_type=$FlowFixMe
|
|
suppress_type=$FixMe
|
|
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-0]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-0]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
|
|
|
[version]
|
|
0.20.1
|