From c9186043b1c336a2cf0f481136eefda7f7a38149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Sat, 18 Aug 2018 12:03:15 +0800 Subject: [PATCH] Make rollbar variable optional --- src/rollbar.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rollbar.js b/src/rollbar.js index b62df996..8bf19d68 100644 --- a/src/rollbar.js +++ b/src/rollbar.js @@ -1,7 +1,6 @@ -import Rollbar from 'rollbar'; - // Track error by rollbar.com if (location.host === 'preview.pro.ant.design') { + const Rollbar = require('rollbar').default; Rollbar.init({ accessToken: '033ca6d7c0eb4cc1831cf470c2649971', captureUncaught: true, -- GitLab