-
Notifications
You must be signed in to change notification settings - Fork 0
/
.umirc.ts
65 lines (63 loc) · 1.54 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
import { defineConfig } from 'dumi'
import path from 'path'
import { version } from './packages/components/package.json'
import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin'
export default defineConfig({
title: 'ProComponents',
outputPath: './docs-dist',
mode: 'site',
history: { type: 'hash' },
publicPath: './',
// more config: https://d.umijs.org/config
sass: {},
navs: [
null,
{
title: 'Github',
path: 'https://github.com/CJY0208/pro-components',
},
{ title: `v${version}`, path: 'https://www.npmjs.com/package/@cjy0208/pro-components' },
],
alias: {
'@root': process.cwd(),
'@docs': path.resolve(__dirname, './docs'),
'@dumiTheme': path.resolve(__dirname, './.dumi/theme'),
},
nodeModulesTransform: {
type: 'none',
},
extraBabelPlugins: [
[
'babel-plugin-jsx-css-modules',
{
styleFileReg: [/\.module\.(css|less|scss)$/],
prefer: 'local',
helperImportType: 'esm',
},
],
[
'babel-plugin-import',
{
libraryName: '@cjy0208/tools',
camel2DashComponentName: false,
libraryDirectory: 'es',
},
'@cjy0208/tools',
],
[
'babel-plugin-import',
{
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
},
'antd',
],
],
chainWebpack(config) {
config.plugin('monaco-editor').use(MonacoWebpackPlugin)
},
// 使用 mfsu 配置来进行加速,具体参考以下地址
// https://github.com/umijs/umi/issues/6766
// mfsu: {},
})