diff --git a/.webpackrc.js b/.webpackrc.js index fe823e7a8f2fc87986f1dc1310d4addaaa8ae7a5..4d405e5f6fe7e4506b4f15c9475518a4da93edb1 100755 --- a/.webpackrc.js +++ b/.webpackrc.js @@ -2,7 +2,16 @@ const path = require('path'); export default { entry: 'src/index.js', - extraBabelPlugins: [['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }]], + extraBabelPlugins: [ + [ + 'import', + { + libraryName: 'antd', + libraryDirectory: 'es', + style: true, + }, + ], + ], env: { development: { extraBabelPlugins: ['dva-hmr'], diff --git a/package.json b/package.json index ad0c669fd27755f0748fd86d27eb1fddc67a4e9e..37c0b8487918f7262e1025e7629d7537e9bf7ff2 100755 --- a/package.json +++ b/package.json @@ -24,16 +24,16 @@ "dependencies": { "@antv/data-set": "^0.8.0", "@babel/polyfill": "^7.0.0-beta.36", - "antd": "^3.4.3", + "antd": "^3.6.1", "bizcharts": "^3.1.5", "bizcharts-plugin-slider": "^2.0.3", "classnames": "^2.2.5", - "dva": "^2.2.3", + "dva": "^2.3.0", "dva-loading": "^2.0.1", "enquire-js": "^0.2.1", "less": "2.7.2", "lodash": "^4.17.4", - "lodash-decorators": "^5.0.0", + "lodash-decorators": "^5.0.1", "moment": "^2.22.0", "numeral": "^2.0.6", "omit.js": "^1.0.0", @@ -51,7 +51,7 @@ }, "devDependencies": { "@types/react": "^16.3.8", - "@types/react-dom": "^16.0.5", + "@types/react-dom": "^16.0.6", "antd-theme-webpack-plugin": "^1.0.8", "babel-eslint": "^8.1.2", "babel-plugin-dva-hmr": "^0.4.1", @@ -70,12 +70,12 @@ "eslint-plugin-import": "^2.8.0", "eslint-plugin-jsx-a11y": "^6.0.3", "eslint-plugin-markdown": "^1.0.0-beta.6", - "eslint-plugin-react": "^7.0.1", - "gh-pages": "^1.0.0", + "eslint-plugin-react": "^7.9.1", + "gh-pages": "^1.2.0", "husky": "^0.14.3", "lint-staged": "^7.0.5", "mockjs": "^1.0.1-beta3", - "prettier": "1.13.2", + "prettier": "1.13.4", "pro-download": "^1.0.1", "redbox-react": "^1.5.0", "regenerator-runtime": "^0.11.1", diff --git a/src/rollbar.js b/src/rollbar.js index f333309fdbb5162b2a8c91e7df109a58afb7ad40..f14753b10e2aff55ae78b01ccd8cd97ce762ccb1 100644 --- a/src/rollbar.js +++ b/src/rollbar.js @@ -1,7 +1,7 @@ import Rollbar from 'rollbar'; // Track error by rollbar.com -if (location.host === 'preview.pro.ant.design') { +if (window.location.host === 'preview.pro.ant.design') { Rollbar.init({ accessToken: '033ca6d7c0eb4cc1831cf470c2649971', captureUncaught: true,