Pre-generated browser build files

#1

I am trying to use the pre-generated browser build file bitcore-lib.js, but it doesn’t work for me.

Is that the only file I should need?

It looks like that file uses a lot of other required files, but I thought it was supposed to be a bundle that was not dependent on a bunch of other files.

I have been trying to get it to work by creating the files myself through node.js, but there are so many dependencies that I am failing to do that.

0 Likes

(Braydon Fuller) #2

Yes bitcore-lib.js should be the only file you need:

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8" />
<script src="bitcore-lib.js"></script>
<script>
var bitcore = require('bitcore-lib');
console.log(bitcore);
</script>
</head>
<body>
</body>
</html>

Latest release is available at: https://github.com/bitpay/bitcore-lib/commit/29bf7e7d90f067f83d686193e85077445fd9dcef

If you’re loading bitcore-mnemonic.js or bitcore-payment-protocol.js you’ll also need to load bitcore-lib.js. More details at: https://bitcore.io/guides/browser

What were the issues when generating the build?

1 Like