import Rollbar from 'rollbar';

const rollbar = new Rollbar({
  accessToken: 'POST_CLIENT_ITEM_TOKEN',
  captureUncaught: false,
  captureUnhandledRejections: false
})

module.exports = function tool(x) {
  rollbar.log('foobar got data', {x})
}

// Use noconflict so we can embed rollbar.js in this library
var Rollbar = require('rollbar/dist/rollbar.noconflict.umd');

const rollbar = new Rollbar({
  accessToken: 'POST_CLIENT_ITEM_TOKEN',
  captureUncaught: true,
  captureUnhandledRejections: true
})

module.exports = function tool(x) {
  rollbar.log('foobar got data', {x})
}

Use the new noconflict build to show an example of how to embed rollbar.js into a library which will not cause any conflicts with another install of Rollbar @rokob
Use the new noconflict build to show an example of how to embed rollbar.js into a library which will not cause any conflicts with another install of Rollbar @rokob
