diff --git a/package.json b/package.json index e04839f580e627bd3b107f8777b80358b0454828..714c155df443d19b2dbc3662f03461106da034d9 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 94810fbd156cd5c3e72fcfaf8106a97ee8e3b398..21e0b3d8e523179a80375b2e2b4fa66bf5abf2a8 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', },