Commit 21c252c8 authored by 陈帅's avatar 陈帅

fix #2279, ga add judge

parent 536b28e1
// https://umijs.org/config/ // https://umijs.org/config/
import os from 'os'; import os from 'os';
import pageRoutes from './router.config'; import pageRoutes from './router.config';
import webpackplugin from './plugin.config'; import webpackPlugin from './plugin.config';
import defaultSettings from '../src/defaultSettings'; import defaultSettings from '../src/defaultSettings';
export default { export default {
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
'umi-plugin-ga', 'umi-plugin-ga',
{ {
code: 'UA-72788897-6', code: 'UA-72788897-6',
judge: () => window.location.hostname === 'preview.pro.ant.design',
}, },
], ],
], ],
...@@ -108,7 +109,7 @@ export default { ...@@ -108,7 +109,7 @@ export default {
], ],
}, },
chainWebpack: webpackplugin, chainWebpack: webpackPlugin,
cssnano: { cssnano: {
mergeRules: false, mergeRules: false,
}, },
......
...@@ -84,10 +84,10 @@ ...@@ -84,10 +84,10 @@
"stylelint-config-standard": "^18.0.0", "stylelint-config-standard": "^18.0.0",
"umi": "^2.1.1", "umi": "^2.1.1",
"umi-plugin-react": "^1.1.1", "umi-plugin-react": "^1.1.1",
"umi-plugin-ga": "^1.0.3" "umi-plugin-ga": "^1.1.1"
}, },
"optionalDependencies": { "optionalDependencies": {
"puppeteer": "^1.6.0" "puppeteer": "^1.9.0"
}, },
"lint-staged": { "lint-staged": {
"**/*.{js,jsx,less}": [ "**/*.{js,jsx,less}": [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment