From 21c252c8da9fb884908a52edca782bc772824e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Tue, 9 Oct 2018 10:07:45 +0800 Subject: [PATCH] fix #2279, ga add judge --- config/config.js | 5 +++-- package.json | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/config.js b/config/config.js index 852fdda9..8d5c576b 100644 --- a/config/config.js +++ b/config/config.js @@ -1,7 +1,7 @@ // https://umijs.org/config/ import os from 'os'; import pageRoutes from './router.config'; -import webpackplugin from './plugin.config'; +import webpackPlugin from './plugin.config'; import defaultSettings from '../src/defaultSettings'; export default { @@ -40,6 +40,7 @@ export default { 'umi-plugin-ga', { code: 'UA-72788897-6', + judge: () => window.location.hostname === 'preview.pro.ant.design', }, ], ], @@ -108,7 +109,7 @@ export default { ], }, - chainWebpack: webpackplugin, + chainWebpack: webpackPlugin, cssnano: { mergeRules: false, }, diff --git a/package.json b/package.json index 4c37cdac..6fb083d5 100644 --- a/package.json +++ b/package.json @@ -84,10 +84,10 @@ "stylelint-config-standard": "^18.0.0", "umi": "^2.1.1", "umi-plugin-react": "^1.1.1", - "umi-plugin-ga": "^1.0.3" + "umi-plugin-ga": "^1.1.1" }, "optionalDependencies": { - "puppeteer": "^1.6.0" + "puppeteer": "^1.9.0" }, "lint-staged": { "**/*.{js,jsx,less}": [ -- GitLab