stellar / js-xdr

Read/write XDR encoded data structures (RFC 4506)
Apache License 2.0
25 stars 31 forks source link

Remove `runtime` from Babel options #9

Closed bartekn closed 6 years ago

bartekn commented 6 years ago

Multiple developers reported an issue with Babel in js-xdr (in https://github.com/stellar/js-stellar-sdk/issues/88 and other issues):

Module not found: Can't resolve 'babel-runtime/helpers/interop-require' in '/Users/user/Documents/test/react-project/node_modules/js-xdr/lib'

I reproduced the error using: https://github.com/stellar/js-stellar-sdk/issues/88#issuecomment-341774206 and removed:

optional: ["runtime"]

from gulpfile. Then I built the project and pointed js-xdr in repro node_modules directory to a newly built package and it worked correctly.

Not sure what runtime option does, it's no longer in Babel docs and I can't find it history. @nullstyle could you confirm removing this option is safe?

nullstyle commented 6 years ago

@bartekn I'll look into the safety of removing this option later today.

PierrickGT commented 6 years ago

Tried it with a blank new create-react-app project and it's working. Thank you for your work, hope to see it merged soon. :)

nullstyle commented 6 years ago

I feel confident we can merge this

bartekn commented 6 years ago

@nullstyle thanks, do you want to release a new version of js-xdr or I should do it?