bytewitchcraft / apollo-absinthe-upload-link

A network interface for Apollo that enables file-uploading to Absinthe back ends.
62 stars 37 forks source link

Remove dependency on ramda #14

Closed topaxi closed 5 years ago

topaxi commented 5 years ago

In my create-react-app, this package pulls in the whole of ramda as tree shaking isn't supported yet.

I've rewritten the small part which uses ramda to plain JS to remove around ~80kb of JavaScript in my app.

MikaAK commented 5 years ago

Other option is to use babel ramda for now to force tree shaking

topaxi commented 5 years ago

@MikaAK while I agree that this could be solved by another dependency, I'd rather fix something by removing one and using idiomatic plain JavaScript. We are talking about one line which uses an external dependency, using ramda in this case isn't shorter or even clearer in intend than the plain JavaScript version. If ramda was used more through the code-base, I think it would be appropriate to use something to tree-shake the dependency too.