ccxt-exchanges-loader

2.0.0 • Public • Published

ccxt-exchanges-loader

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

Version support

  • From v2, the loader supports ccxt v4.
  • For ccxt v2 support, use loader v1.

Use case

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

This loader is useful if you:

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

You will get a 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', 'kraken'],
              removePro: true
            }
          }
        ],
        include: /node_modules\/ccxt/,
      },
    ]
  ]
}

3. Enjoy a lighter package

Comparison with the loader. 2 MegaBytes vs 310 KiloBytes

Warning

The loader may become incompatible with newer versions of ccxt. In case of problem, open an issue.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    49
    • latest

Version History

Package Sidebar

Install

npm i ccxt-exchanges-loader

Weekly Downloads

49

Version

2.0.0

License

MIT

Unpacked Size

9.5 kB

Total Files

7

Last publish

Collaborators

  • aodev