Skip to content
  • Adam Miskiewicz's avatar
    Reverted commit D2803288 · 28116ec3
    Adam Miskiewicz authored
    Summary:
    As spicyj mentioned in commit 6a838a42, the ideal state of affairs when it comes to consuming `react` and `fbjs` from NPM is for the packager not to have knowledge of either package. This PR addresses the `fbjs` part of that, and relies on https://github.com/facebook/fbjs/pull/95. **DO NOT MERGE** until #95 (or a variation) is in `fbjs` and is released to npm.
    
    This PR does several things:
    
    1. Adds stub modules within RN that expose `fbjs` modules to be required using Haste. After discussing a few ideas with spicyj, this seemed like a good option to keep internal FB devs happy (and not make them change the way they write JS), but allow for removing packager complexity and fit in better with the NPM ecosystem. Note -- it skips stubbing `fetch`, `ExecutionEnvironment`, and `ErrorUtils`, due to the fact that these need to have Native specific implementations, and there's no reason for those implementations to exist in `fbjs`.
    2. Removes the modules that were previously being used in lieu of their `fbjs` eq
    Closes https://github.com/facebook/react-native/pull/5084
    
    Reviewed By: bestander
    
    Differential Revision: D2803288
    
    Pulled By: javache
    
    fb-gh-sync-id: 121ae811ce4cc30e6ea79246f85a1e4f65648ce1
    shipit-source-id: 121ae811ce4cc30e6ea79246f85a1e4f65648ce1
    28116ec3