forked from ant-design/ant-design-web3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.dumirc.ts
149 lines (142 loc) · 3.76 KB
/
.dumirc.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
import { readdirSync } from 'fs';
import { join } from 'path';
import { defineConfig } from 'dumi';
// utils must build before core
// runtime must build before renderer-react
const pkgList = readdirSync(join(__dirname, 'packages')).map((pkg) => {
const packageJson = require(join(__dirname, 'packages', pkg, 'package.json'));
return {
name: packageJson.name,
exports: packageJson.exports,
path: join(__dirname, 'packages', pkg, 'src'),
};
});
const alias = pkgList.reduce(
(pre, pkg) => {
pre[pkg.name] = pkg.path;
// has multiple entries
if (pkg.exports && pkg.exports['.']) {
Object.keys(pkg.exports).forEach((key) => {
pre[`${pkg.name}/${key}`] = join(pkg.path, key);
});
}
return {
...pre,
};
},
{} as Record<string, string>,
);
export default defineConfig({
title: 'Ant Design Web3 - A React components collection for Web3!',
headScripts: [
{
src: 'https://www.googletagmanager.com/gtag/js?id=G-C31HWEY1D4',
async: true,
},
`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-C31HWEY1D4');
`,
],
mfsu: false,
alias,
metas: [
{
name: 'keywords',
content:
'web3, Ant Design Web3, Ant Design, dapp, frontend, components,web3, admin , Ant Design, ant design, react, alibaba',
},
{ name: 'description', content: 'A Components for Web3, Based on Ant Design,' },
{
property: 'og:site_name',
content: 'Ant Design Web3',
},
{
'data-rh': 'keywords',
property: 'og:image',
content: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
},
{
property: 'og:description',
content:
'Ant Design Web3 是一个基于 Ant Design 的 Web3 React 组件库,它提供了一系列的组件,可以帮助你快速构建去中心化应用(DApp)。',
},
{
name: 'apple-mobile-web-app-capable',
content: 'yes',
},
{
name: 'apple-mobile-web-app-status-bar-style',
content: 'black-translucent',
},
{
name: 'theme-color',
content: '#1890ff',
},
{
name: 'google-site-verification',
content: '9LDp--DeEC-xOggsHl_t1MlR_1_2O972JpSUu8NZKMU',
},
],
resolve: {
atomDirs: [
{
type: 'component',
dir: 'packages/web3/src',
},
],
},
jsMinifierOptions: {
target: ['chrome80', 'es2020'],
},
copy: ['CNAME'],
define: {
YOUR_ZAN_API_KEY: 'd0eeefc2a4da4a8ba707889259b437d6',
YOUR_INFURA_API_KEY: '287294cbc30b44efab9455664b69b130',
YOUR_WALLET_CONNET_PROJECT_ID: 'c07c0051c2055890eade3556618e38a6',
},
publicPath: process.env.PUBLIC_PATH || '/',
base: process.env.BASE || '/',
themeConfig: {
name: 'Ant Design Web3',
logo: 'https://mdn.alipayobjects.com/huamei_mutawc/afts/img/A*MgfMRpa9Df8AAAAAAAAAAAAADlrGAQ/original',
socialLinks: {
github: 'https://github.com/ant-design/ant-design-web3',
twitter: 'https://twitter.com/AntDesignWeb3',
},
},
favicons: [
'https://mdn.alipayobjects.com/huamei_mutawc/afts/img/A*XACEQ5Lqbt8AAAAAAAAAAAAADlrGAQ/original',
],
locales: [
{
id: 'en-US',
name: 'English',
},
{ id: 'zh-CN', name: '中文' },
],
extraBabelPlugins: [
[
'inline-react-svg',
{
svgo: {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
cleanupIDs: {
// Don't minify ids in `svg` to avoid conflict.
preservePrefixes: ['ant-web3-icon-'],
},
},
},
},
],
},
},
],
],
});