From 3dec7c8b711b2a85c74116f95ef00fa2154bab04 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 23 Nov 2017 19:23:24 +0800 Subject: [PATCH] use rollbar over rollbar-browser --- package.json | 2 +- src/rollbar.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e04839f5..714c155d 100755 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "redbox-react": "^1.3.2", "roadhog": "^1.3.1", "roadhog-api-doc": "afc163/roadhog-api-doc#fix-babel-resolve", - "rollbar-browser": "^1.9.5", + "rollbar": "^2.3.1", "stylelint": "^8.1.0", "stylelint-config-standard": "^17.0.0" }, diff --git a/src/rollbar.js b/src/rollbar.js index 94810fbd..21e0b3d8 100644 --- a/src/rollbar.js +++ b/src/rollbar.js @@ -1,10 +1,11 @@ -import Rollbar from 'rollbar-browser'; +import Rollbar from 'rollbar'; // Track error by https://sentry.io/ if (location.host === 'preview.pro.ant.design') { Rollbar.init({ accessToken: '033ca6d7c0eb4cc1831cf470c2649971', captureUncaught: true, + captureUnhandledRejections: true, payload: { environment: 'production', }, -- GitLab