facebook/fbt

Remove fbjs dependency

alexandernanberg opened this issue ยท 2 comments

๐Ÿš€ Feature Proposal

Inline the used functions from fbjs (keyMirror and forEachObject) and remove the dependency

Motivation

1 less dependency is always good. fbjs have a bunch of dependencies too so the impact isn't small imo.

E.g. all consumers will download these but they are never used

    core-js "^2.4.1"
    fbjs-css-vars "^1.0.0"
    isomorphic-fetch "^2.1.1"
    loose-envify "^1.0.0"
    object-assign "^4.1.0"
    promise "^7.1.1"
    setimmediate "^1.0.5"
    ua-parser-js "^0.7.18"

If you agree, I can try creating a PR inlining the functions

Example

N/A

Pitch

N/A

Inline the used functions from fbjs (keyMirror and forEachObject) and remove the dependency

Makes sense to me. FbtUtil.js would be a good place to port these two methods to. cc. @kayhadrin any objection?

Sure, happy to see these dependencies removed; please ensure that Flow types are still preserved though! :-)

Code pointers: