-
Notifications
You must be signed in to change notification settings - Fork 0
/
.umirc.ts
108 lines (105 loc) · 2.91 KB
/
.umirc.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import { defineConfig } from 'dumi';
export default defineConfig({
title: 'L7 开发 Demo',
favicon: 'https://gw.alipayobjects.com/zos/antfincdn/FLrTNDvlna/antv.png',
logo: 'https://gw.alipayobjects.com/zos/antfincdn/FLrTNDvlna/antv.png',
outputPath: 'docs-dist',
base: '/',
devServer: {
port: '6006',
},
resolve: {
includes: ['dev-demos'],
},
polyfill: {
imports: ['element-remove', 'babel-polyfill'],
},
targets: {
chrome: 58,
ie: 11,
},
mode: 'site',
navs: [
{
title: 'bugs',
path: '/bugs',
},
{
title: '特性',
path: '/features',
},
{
title: '图库',
path: '/gallery',
},
{
title: '瓦片',
path: '/tile',
},
{
title: '栅格',
path: '/raster',
},
{
title: '组件',
path: '/component',
},
{
title: '绘制组件',
path: '/draw',
},
{
title: 'GitHub',
path: 'https://github.com/antvis/L7',
},
],
esbuild: false,
chainWebpack: (memo, { env, webpack, createCSSRule }) => {
// 设置 alias
memo.module
.rule('lint')
.test(/\.glsl$/)
.use('babel')
.loader('ts-shader-loader');
// 还可以创建具名use (loaders)
},
extraBabelPresets: ['@babel/preset-typescript'],
extraBabelIncludes: [
'@umijs/preset-dumi',
'split-on-first',
'query-string',
'strict-uri-encode',
'copy-text-to-clipboard',
],
extraBabelPlugins: [
['transform-import-css-l7'],
['babel-plugin-inline-import', { extensions: ['.worker.js'] }],
],
externals: {
react: 'window.React',
'react-dom': 'window.ReactDOM',
antd: 'window.antd',
lodash: '_',
fetch: 'window.fetch',
},
styles: ['https://gw.alipayobjects.com/os/lib/antd/4.16.13/dist/antd.css'],
scripts: [
` window._AMapSecurityConfig = {
securityJsCode: "290ddc4b0d33be7bc9b354bc6a4ca614"
}`,
'https://webapi.amap.com/maps?v=2.0&key=6f025e700cbacbb0bb866712d20bb35c',
'https://gw.alipayobjects.com/os/lib/whatwg-fetch/3.6.2/dist/fetch.umd.js',
'https://gw.alipayobjects.com/os/lib/react/17.0.2/umd/react.profiling.min.js',
'https://gw.alipayobjects.com/os/lib/react-dom/17.0.2/umd/react-dom.profiling.min.js',
'https://gw.alipayobjects.com/os/lib/react/17.0.2/umd/react.production.min.js',
'https://gw.alipayobjects.com/os/lib/react-dom/17.0.2/umd/react-dom.production.min.js',
// 'https://gw.alipayobjects.com/os/lib/antd/4.16.13/dist/antd-with-locales.js',
'https://gw.alipayobjects.com/os/lib/antd/4.19.4/dist/antd.js',
'https://api.map.baidu.com/api?type=webgl&v=1.0&ak=zLhopYPPERGtpGOgimcdKcCimGRyyIsh',
// "https://api.map.baidu.com/api?v=1.0&&type=webgl&ak=zLhopYPPERGtpGOgimcdKcCimGRyyIsh",
/** lodash */
'https://gw.alipayobjects.com/os/lib/lodash/4.17.20/lodash.min.js',
],
publicPath: '/public/',
// more config: https://d.umijs.org/config
});