forked from ant-design/ant-design-pro-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.umirc.js
118 lines (117 loc) · 2.49 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
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
109
110
111
112
113
114
115
116
117
118
const isProduction = process.env.NODE_ENV === 'production';
const menus = require('./formatMenu');
export default {
title: 'Ant Design Pro',
mode: 'site',
logo: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
extraBabelPlugins: [
[
'import',
{
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
},
],
],
locale: {
default: 'zh-CN',
// default true, when it is true, will use `navigator.language` overwrite default
baseNavigator: true,
},
metas: [
{
property: 'og:site_name',
content: 'Ant Design Pro',
},
{
'data-rh': 'keywords',
property: 'og:image',
content: 'https://procomponents.ant.design/icon.png',
},
{
property: 'og:description',
content: '🏆 让中后台开发更简单',
},
{
name: 'keywords',
content: '中后台,admin,Ant Design,ant design,Table,react,alibaba',
},
{
name: 'description',
content: '🏆 让中后台开发更简单 包含 table form 等多个组件。',
},
{
name: 'apple-mobile-web-app-capable',
content: 'yes',
},
{
name: 'apple-mobile-web-app-status-bar-style"',
content: 'black-translucent',
},
],
// 用于切换 antd 暗黑模式
// antd: {
// dark: true,
// },
resolve: {
includes: ['docs', 'config', 'blog'],
},
locales: [
['en-US', 'English'],
['zh-CN', '中文'],
],
navs: {
'en-US': [
null,
{
title: 'GitHub',
path: 'https://github.com/ant-design/ant-design-pro',
},
],
'zh-CN': [
null,
{
title: 'GitHub',
path: 'https://github.com/ant-design/ant-design-pro',
},
],
},
analytics: isProduction
? {
ga: 'UA-72788897-5',
}
: false,
hash: true,
ssr: {},
exportStatic: {},
targets: {
chrome: 80,
firefox: false,
safari: false,
edge: false,
ios: false,
},
theme: {
'@s-site-menu-width': '242px',
},
ignoreMomentLocale: true,
headScripts: ['https://gw.alipayobjects.com/os/antfincdn/fdj3WlJd5c/darkreader.js'],
externals: { darkreader: 'window.DarkReader' },
webpack5: {},
fastRefresh: {},
lessLoader: {
test: /\.less$/i,
loader: [
// compiles Less to CSS
'style-loader',
'css-loader',
'less-loader',
],
},
postcssLoader: {
test: /\.css$/i,
use: ['style-loader', 'css-loader', 'postcss-loader'],
},
menus,
};