-
Notifications
You must be signed in to change notification settings - Fork 1k
/
.dumirc.ts
83 lines (81 loc) · 2.38 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
import { defineConfig } from 'dumi';
import path from 'path';
import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin';
export default defineConfig({
favicons: ['https://img.alicdn.com/tfs/TB17UtINiLaK1RjSZFxXXamPFXa-606-643.png'],
outputPath: 'docs-dist',
// locales: [{ id: 'zh-CN', name: '中文' }, { id: 'en-US', name: 'English' }],
locales: [{ id: 'zh-CN', name: '中文' }],
themeConfig: {
name: 'XRender',
logo: 'https://img.alicdn.com/tfs/TB17UtINiLaK1RjSZFxXXamPFXa-606-643.png',
footer: false,
socialLinks: {
github: 'https://github.com/alibaba/x-render',
},
nav: {
'zh-CN': [
{
title: 'FormRender',
link: '/form-render',
},
{
title: 'TableRender',
link: '/table-render',
},
{
title: 'ChartRender',
link: '/chart-render',
},
{
title: 'Playground',
link: '/playground',
}
],
// 'en-US': [
// {
// title: 'FormRender',
// link: '/en/form-render',
// }
// ]
},
},
extraBabelPlugins: [
[
'import',
{
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
},
'antd',
],
[
'import',
{
libraryName: '@alifd/next',
libraryDirectory: 'lib',
},
'@alifd/next',
],
],
ignoreMomentLocale: true,
chainWebpack(config, { webpack }) {
config.plugin('monaco-editor').use(MonacoWebpackPlugin);
},
headScripts: [
'https://g.alicdn.com/code/lib/react/17.0.1/umd/react.production.min.js',
'https://g.alicdn.com/code/lib/react-dom/17.0.1/umd/react-dom.production.min.js'
],
plugins: [require.resolve('./scripts/dumi-plugin/redirect')],
alias: {
'form-render/es': path.resolve(__dirname, 'packages/form-render/src'),
'form-render': path.resolve(__dirname, 'packages/form-render/src'),
'table-render': path.resolve(__dirname, 'packages/table-render/src'),
'form-render-mobile': path.resolve(__dirname, 'packages/form-render-mobile/src'),
'@xrenders/schema-builder': path.resolve(__dirname, 'tools/schema-builder/src'),
'@xrenders/data-render': path.resolve(__dirname, 'packages/data-render/src'),
},
codeSplitting: { jsStrategy: 'granularChunks' },
//...(process.env.NODE_ENV === 'development' ? {} : { ssr: {} }),
});