Skip to content

v102

Compare
Choose a tag to compare
@ije ije released this 27 Dec 21:23
· 1242 commits to main since this release
  • Support browser field of package.json to improve compatibility with npm packages in browser. For example, the webtorrent package will use memory-chunk-store instead of fs-chunk-store and exclude built-in modules like fs, 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)