1+ import { defineConfig } from 'umi' ;
12import GI_SDK from '@antv/gi-sdk/package.json' ;
23import GI_THEME_ANTD from '@antv/gi-theme-antd/package.json' ;
3-
44import deps_externals from './scripts/deps_externals.json' ;
55export const G6_VERSION = '4.8.14' ;
66export const GRAPHIN_VERSION = '2.7.16' ;
@@ -26,22 +26,25 @@ export const externalScripts = deps_externals.map(c => {
2626 return { src : c . url } ;
2727} ) ;
2828console . log ( 'externals' , externals , BUILD_MODE ) ;
29+ const BASE_CONFIG = {
30+ links : [
31+ {
32+ href : 'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*7svFR6wkPMoAAAAAAAAAAAAADmJ7AQ/original' ,
33+ rel : 'shortcut icon' ,
34+ } ,
35+ ] ,
36+ } ;
2937const EXTRA_CONFIG = isDev
3038 ? {
3139 externals : {
3240 react : 'React' ,
3341 'react-dom' : 'ReactDOM' ,
3442 antd : 'antd' ,
35- // '@antv/g6': 'G6',
36- // '@antv/graphin': 'Graphin',
3743 } ,
3844 scripts : [
39- 'https://gw.alipayobjects.com/os/lib/react/17.0.2 /umd/react.production.min.js' ,
40- 'https://gw.alipayobjects.com/os/lib/react-dom/17.0.2 /umd/react-dom.production.min.js' ,
45+ 'https://gw.alipayobjects.com/os/lib/react/18.2.0 /umd/react.production.min.js' ,
46+ 'https://gw.alipayobjects.com/os/lib/react-dom/18.2.0 /umd/react-dom.production.min.js' ,
4147 'https://gw.alipayobjects.com/os/lib/antd/4.24.8/dist/antd.min.js' ,
42- // 'https://gw.alipayobjects.com/os/lib/antv/g6/4.8.8/dist/g6.min.js',
43- // // 'https://gw.alipayobjects.com/os/lib/antv/graphin/2.7.13/dist/graphin.min.js',
44- // 'http://localhost:5501/graphin.min.js',
4548 ] ,
4649 links : [ ] ,
4750 }
@@ -58,31 +61,48 @@ const EXTRA_CONFIG = isDev
5861 } ;
5962
6063export default {
61- // base: '/',
6264 base : '/' ,
65+ title : 'AntV Insight 让数据栩栩如生' ,
66+ metas : [
67+ {
68+ name : 'keywords' ,
69+ content : 'AntV Insight 数据可视化平台 图可视化 地理可视化 分析应用低代码构建' ,
70+ } ,
71+ {
72+ name : 'description' ,
73+ content :
74+ 'AntV Insight 是蚂蚁集团 AntV 团队推出的一款数据分析产品,用户可以在线完成视觉映射,分析洞察工作,也可以一键导出SDK,二次开发,集成部署' ,
75+ } ,
76+ ] ,
77+ externals : EXTRA_CONFIG . externals ,
78+ scripts : EXTRA_CONFIG . scripts ,
79+ links : [ ...BASE_CONFIG . links , ...EXTRA_CONFIG . links ] ,
80+ styles : [ 'body {background: var(--background-color); color: var(--text-color)}' ] ,
81+ headScripts : [
82+ 'https://www.googletagmanager.com/gtag/js?id=G-9Z6Z0NTLFB' ,
83+ "window.dataLayer = window.dataLayer || [];function gtag() {dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-9Z6Z0NTLFB');" ,
84+ "window.TracertCmdCache = window.TracertCmdCache || [];var t = window.Tracert || {_isRenderInit: !0,call: function () {window.TracertCmdCache.push(arguments);},},f = ['call','start','config','logPv','info','err','click','expo','pageName','pageState','time','timeEnd','parse','checkExpo','stringify','report','set','before'];for (let i = 0; i < f.length; i++) {(function (fn) {t[fn] = function () {var a = [],l = arguments.length;for (var j = 0; j < l; j++) {a.push(arguments[j]);}a.unshift(fn);window.TracertCmdCache.push(a);};})(f[i]);}window.Tracert = t;window._to = window._to || {};function filterLog(logType) {return function (opts) {return !!window.GI_USER_INFO?.outUserNo;};}window.Tracert.call('before', 'logPv', filterLog('PageMonitor'));window.Tracert.call('before', 'expo', filterLog('expo'));window.Tracert.call('before', 'click', filterLog('click'));" ,
85+ 'https://ur.alipay.com/tracert_a3220.js' ,
86+ ] ,
6387 publicPath : BUILD_MODE === 'docker' ? '/public/' : '/' ,
6488 hash : true ,
65- favicon : 'https://gw.alipayobjects.com/zos/bmw-prod/b9a0f537-3768-445d-aa39-ff49de82124a.svg' ,
89+ favicons : [ 'https://gw.alipayobjects.com/zos/bmw-prod/b9a0f537-3768-445d-aa39-ff49de82124a.svg' ] ,
6690 history : {
67- type : 'hash ' ,
91+ type : 'browser ' ,
6892 } ,
6993 alias : {
7094 '@' : './src' ,
71- } ,
72- nodeModulesTransform : {
73- type : 'none' ,
95+ // '@antv/gi-sdk': '../gi-sdk/src',
7496 } ,
7597 routes : [
76- { exact : true , path : '/ ' , redirect : '/home' } ,
98+ { exact : true , path : '' , redirect : '/home' } ,
7799 { exact : true , path : '/workspace/:projectId' , component : 'Analysis' } ,
78100 { exact : true , path : '/share/:shareId' , component : 'Share' } ,
79101 { exact : true , path : '/tabs/:type' , component : 'Tab' } ,
80102 {
81103 path : '/' ,
82- component : '@/layouts/index ' ,
104+ component : '@/layouts/Main ' ,
83105 routes : [
84- { exact : true , path : '/workspace' , component : 'Workspace' } ,
85- { exact : true , path : '/services' , component : 'ServerCenter' } ,
86106 { exact : true , path : '/home' , component : 'Home' } ,
87107 {
88108 path : '/dataset' ,
@@ -182,25 +202,34 @@ export default {
182202 } ,
183203 ] ,
184204 } ,
185- { component : '404' } ,
205+ { exact : true , path : '/services' , component : 'ServerCenter' } ,
206+ { exact : true , path : '/workspace' , component : 'Workspace' } ,
186207 ] ,
187208 } ,
209+ { component : '404' } ,
188210 ] ,
189- ... EXTRA_CONFIG ,
211+
190212 request : {
191213 dataField : '' ,
192214 } ,
193- // ...EXTRA_CONFIG,
194- analyze : {
195- analyzerMode : 'server' ,
196- analyzerPort : 8888 ,
197- openAnalyzer : true ,
198- // generate stats file while ANALYZE_DUMP exist
199- generateStatsFile : false ,
200- statsFilename : 'stats.json' ,
201- logLevel : 'info' ,
202- defaultSizes : 'parsed' , // stat // gzip
215+ fastRefresh : true ,
216+ mfsu : {
217+ // exclude: ['@antv/*', '@alipay/*'],
218+ // strategy: 'eager',
203219 } ,
220+ // monorepoRedirect: {
221+ // srcDir: ['src'],
222+ // },
223+ // analyze: {
224+ // analyzerMode: 'server',
225+ // analyzerPort: 8888,
226+ // openAnalyzer: true,
227+ // // generate stats file while ANALYZE_DUMP exist
228+ // generateStatsFile: false,
229+ // statsFilename: 'stats.json',
230+ // logLevel: 'info',
231+ // defaultSizes: 'parsed', // stat // gzip
232+ // },
204233 chainWebpack ( memo , { type } ) {
205234 memo . module
206235 . rule ( 'mjs$' )
0 commit comments