How to use the rollbar.default function in rollbar

To help you get started, we’ve selected a few rollbar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ant-design / ant-design-pro-layout / src / rollbar.js View on Github external
// Track error by rollbar.com
if (location.host === 'preview.pro.ant.design') {
  const Rollbar = require('rollbar').default;
  Rollbar.init({
    accessToken: '033ca6d7c0eb4cc1831cf470c2649971',
    captureUncaught: true,
    captureUnhandledRejections: true,
    hostWhiteList: ['ant.design'],
    payload: {
      environment: 'production',
    },
  });
}