-
Notifications
You must be signed in to change notification settings - Fork 6
/
.umirc.js
78 lines (76 loc) · 1.93 KB
/
.umirc.js
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
const safeRequire = (p) => {
try {
return require(p);
} catch (error) {
return {};
}
};
const json = safeRequire('./version.json');
const isDev = process.env.NODE_ENV === 'development';
const CDN_URL = isDev ? '' : `//npm.elemecdn.com/usetable-ahooks-asset@${json.version}`;
export default {
title: ' • useTable',
logo: `${CDN_URL}/logo.svg`,
favicon: `${CDN_URL}/simple-logo.svg`,
base: '/',
mode: 'site',
publicPath: `${CDN_URL}/`,
locales: [
['zh-CN', '中文'],
['en-US', 'English'],
],
extraBabelPlugins: [
[
'babel-plugin-import',
{
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
},
'antd',
],
[
'babel-plugin-import',
{
libraryName: '@formily/antd-components',
libraryDirectory: 'lib',
style: true,
},
'@formily/antd-components',
],
[
'babel-plugin-import',
{
libraryName: '@alifd/next',
style: false,
},
'fusion',
],
],
links: [
{
rel: 'stylesheet',
href: 'https://unpkg.com/@alifd/theme-design-pro@0.6.2/dist/next-noreset.min.css',
},
// https://github.com/umijs/dumi/issues/138
{ rel: 'stylesheet', href: `${CDN_URL}/style.css` },
],
resolve: {
includes: ['docs', 'packages'],
},
navs: {
'zh-CN': [
null,
{ title: 'GitHub', path: 'https://github.com/ahooksjs/useTable' },
{ title: '知乎', path: 'https://zhuanlan.zhihu.com/useReact' },
{ title: '更新日志', path: 'https://github.com/ahooksjs/useTable/releases' },
],
'en-US': [
null,
{ title: 'GitHub', path: 'https://github.com/ahooksjs/useTable' },
{ title: 'Zhihu', path: 'https://zhuanlan.zhihu.com/useReact' },
{ title: 'Changelog', path: 'https://github.com/ahooksjs/useTable/releases' },
],
},
headScripts: ['https://hm.baidu.com/hm.js?4e867a25591e04c869cbebe66a8e997f'],
};