ethereumjs / ethereumjs-tx

Project is in active development and has been moved to the EthereumJS VM monorepo.
https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/tx
Mozilla Public License 2.0
781 stars 237 forks source link

ES6 code breaks create-react-app build #59

Closed miladmostavi closed 7 years ago

miladmostavi commented 7 years ago

Because of ES6 code used in this lib, unejected create-react-app applications break while building. This lib is also used in eth-lightwallet, and the workaround I used was to add a postinstall script to my package.json that removes this lib from node_modules. I included this lib in my src/vendor directory, added src/vendor to NODE_PATH so that eth-lightwallet keeps working.

It would be nice if you had a build process that exposed the babelified ES5 version.

tinybike commented 7 years ago

Seconding this request. Right now I have a script with this awful little hack in augur.js and ethrpc to compile their distributables:

./node_modules/.bin/babel ./node_modules/ethereumjs-tx --source-root ./node_modules/ethereumjs-tx  -d ./node_modules/ethereumjs-tx
captDaylight commented 7 years ago

@tinybike Can you elaborate how to implement this hack? I'm in the same boat...