jim 7 лет назад
Родитель
Сommit
c6d129a4f4
3 измененных файлов с 18 добавлено и 9 удалено
  1. 10 1
      .webpackrc.js
  2. 7 7
      package.json
  3. 1 1
      src/rollbar.js

+ 10 - 1
.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'],

+ 7 - 7
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",

+ 1 - 1
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,