v102
-
Support
browser
field of package.json to improve compatibility with npm packages in browser. For example, thewebtorrent
package will usememory-chunk-store
instead offs-chunk-store
and exclude built-in modules likefs
,net
,os
and so on.{ "name": "webtorrent", "description": "Streaming torrent client", "version": "1.9.6", "browser": { "./lib/server.js": false, "./lib/conn-pool.js": false, "./lib/utp.js": false, "bittorrent-dht/client": false, "fs": false, "fs-chunk-store": "memory-chunk-store", "load-ip-set": false, "net": false, "os": false, "ut_pex": false }, }
(Close #450)