ethereumjs-monorepo icon indicating copy to clipboard operation
ethereumjs-monorepo copied to clipboard

There is no CDN updated to use this package in browser

Open SilvioGuedes opened this issue 2 years ago • 5 comments

The CDN for this package is deprecated: https://www.jsdelivr.com/package/npm/ethereumjs-tx

In the docs, the only option to install is by NPM: https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/tx#install

To send a transaction with web3 library, the client needs to use this package (@ethereumjs/tx) in his/hers browser. The client cannot install a package by NPM.

Please, update the docs with another option to install by CDN.

Thanks.

SilvioGuedes avatar Apr 26 '22 03:04 SilvioGuedes

The current package name is https://www.jsdelivr.com/package/npm/@ethereumjs/tx

ryanio avatar Apr 26 '22 06:04 ryanio

A quick follow-up question on this any idea why when I try to load the index.min.js file into browser like:

Then in the browser console, it shows the following bug:

ReferenceError: exports is not defined.

Any suggestion on how to solve it will be appreciated. Thanks!

0x520x650x78 avatar Apr 28 '22 17:04 0x520x650x78

that index.min.js is not provided by us, jsdelivr does it automatically i believe. if you want to use the package in the browser you should browserify it first: https://www.npmjs.com/package/browserify

ryanio avatar Apr 28 '22 22:04 ryanio

OK gotcha, thanks!

0x520x650x78 avatar Apr 29 '22 00:04 0x520x650x78

I guess we should document our package distribution a bit better and mention that the dist.browser packages are not meant to be directly used in the browser, this is indeed very much misleading.

holgerd77 avatar Apr 29 '22 09:04 holgerd77

Outdated, will close.

holgerd77 avatar Jul 31 '23 17:07 holgerd77