messagebird / messagebird-nodejs

The open source Node.js client for MessageBird's REST API
https://www.messagebird.com/developers
105 stars 44 forks source link

fix: #55 Do not use default export #114

Closed aodinok closed 1 year ago

aodinok commented 1 year ago

See: https://github.com/messagebird/messagebird-nodejs/issues/55

To avoid problems with export default - switch to named export. This is going to be a breaking change.

After this is merged MB client will need to be imported differently.

With ES6 import syntax:

   import { initClient } from "messagebird";
   const messagebird = initClient("MB_API_KEY");

With require syntax:

 const messagebird = require("messagebird").initClient("MB_API_KEY");

Package version 4.0.0-alpha will be published soon for tests.