Commit bd0e5ae1 authored by ι™ˆεΈ…'s avatar ι™ˆεΈ…

fix #2672, use APP_TYPE judge add ga

parent bc12d814
......@@ -4,9 +4,7 @@ import pageRoutes from './router.config';
import webpackPlugin from './plugin.config';
import defaultSettings from '../src/defaultSettings';
export default {
// add for transfer to umi
plugins: [
const plugins = [
[
'umi-plugin-react',
{
......@@ -36,14 +34,21 @@ export default {
: {}),
},
],
[
];
// judge add ga
if (process.env.APP_TYPE === 'site') {
plugins.push([
'umi-plugin-ga',
{
code: 'UA-72788897-6',
judge: () => process.env.APP_TYPE === 'site',
},
],
],
]);
}
export default {
// add for transfer to umi
plugins,
targets: {
ie: 11,
},
......@@ -95,7 +100,7 @@ export default {
},
},
manifest: {
basePath:"/"
basePath: '/',
},
chainWebpack: webpackPlugin,
......
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