remove network stuff from main build
The network classes Connection, Peer and PeerManager are not useful from the browser, so I have removed them from the main browser bundle by default. This saves several tens of kilobytes from the browser bundle (since not only are these files not included, but their dependencies are not included either).
This commit is contained in:
parent
e75267bd01
commit
fc942c2ac5
@ -76,8 +76,11 @@ var createBitcore = function(opts) {
|
||||
submodules.splice(submodules.indexOf('lib/BIP39'), 1);
|
||||
submodules.splice(submodules.indexOf('lib/BIP39WordlistEn'), 1);
|
||||
submodules.splice(submodules.indexOf('lib/PayPro'), 1);
|
||||
submodules.splice(submodules.indexOf('lib/Connection'), 1);
|
||||
submodules.splice(submodules.indexOf('lib/Peer'), 1);
|
||||
submodules.splice(submodules.indexOf('lib/PeerManager'), 1);
|
||||
var assert = require('assert');
|
||||
assert(submodules.length == modules.length - 3);
|
||||
assert(submodules.length == modules.length - 6);
|
||||
}
|
||||
|
||||
if (opts.submodules) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user