Closed davidapple closed 5 years ago
window.Bitcoin = require('bitcoinjs-lib')
$ browserify --help
Usage: browserify [entry files] {OPTIONS}
Standard Options:
...
--standalone -s Generate a UMD bundle for the supplied export name.
This bundle works with other module systems and sets the name
given as a window global if no module system is found.
...
browserify -r bitcoinjs-lib -s bitcoin > bitcoinjs-lib.js
will make the global variable bitcoin
available to the browser.
When I run
browserify bitcoinjs-lib > bitcoinjs-lib.js
I get a huge file that doesn't work in the browser end because it contains require() statements.
This is the first 40 lines. The complete file is 21718 lines.