ccxt-exchanges-loader

    0.2.0 • Public • Published

    ccxt-exchanges-loader

    Filter ccxt exchanges that you want to include in your Webpack bundle.

    This module is used to build Cryptovista, a desktop app to monitor crypto portfolios, news and market in a single place. For Mac and Windows.

    Use case

    CCXT is a JavaScript / Python / PHP cryptocurrency trading library with support for more than 100 bitcoin/altcoin exchanges

    This loader is mostly useful if you:

    • ship ccxt with a frontend app
    • don't need all the exchanges that ccxt supports
    • use Webpack

    Smaller bundle: lighter, faster code.

    How to use

    1. Install

    npm install ccxt-exchanges-loader -DE

    2. Webpack config

    Add the loader to your config:

    module.exports = {
      module: {
        rules: [
          //...
          {
            test: /ccxt\.js$/,
            use: [
              {
                loader: 'ccxt-exchanges-loader',
                options: {
                  exchanges: [
                    'binance',
                    'coinbase',
                    'cryptopia',
                    'huobipro',
                    'kraken',
                    'okex',
                    'bittrex'
                  ]
                }
              }
            ],
            include: /node_modules\/ccxt/,
          },
        ]
      ]
    }

    3. Enjoy a lighter package

    Comparison with the loader. 2 MegaBytes vs 310 KiloBytes

    Install

    npm i ccxt-exchanges-loader

    DownloadsWeekly Downloads

    5

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    6.73 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar