forked from lusess123/web-pdm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.umirc.ts
62 lines (61 loc) · 1.76 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
import { defineConfig } from 'dumi';
const CompressionPlugin = require("compression-webpack-plugin");
const productionGzipExtensions = /\.(js|css|json|txt|html|ico|svg)(\?.*)?$/i;
export default defineConfig({
description:'一个用G6做的ER图工具,最终目标是想做成在线版的 powerdesigner',
title: 'web-pdm',
favicon:
'http://zyking.xyz/logo.png',
logo:
'http://zyking.xyz/logo.png',
outputPath: 'docs-dist',
mode: 'site',
resolve : {
includes: ['docs']
},
dynamicImport: {},
exportStatic: {},
// mpa: {},
antd: {},
// esbuild: {},
menus: {
'/guide': [
{
title: '介绍',
children: ['guide/index', 'guide/getting-started'],
},
{
title: '模型定义',
children: ['guide/model', 'guide/relation'],
},
{
title: '工具栏',
children: ['guide/toolbar'],
},
{
title: '其他',
children: ['guide/migration', 'guide/faq', 'guide/next','guide/ddd'],
},
],
},
navs: [
null,
//http://localhost:8001
{ title: 'API', path: '/typedoc/' },
{ title: 'GitHub', path: 'https://github.com/lusess123/web-pdm' },
{ title: '更新日志', path: 'https://github.com/lusess123/web-pdm/blob/master/packages/web-pdm-lib/CHANGELOG.md' },
],
chainWebpack(memo){
memo.plugin('CompressionPlugin').use(new CompressionPlugin({
filename: "[path].gz[query]",
algorithm: "gzip",
test: productionGzipExtensions,
// 只处理大于xx字节 的文件,默认:0
threshold: 10240,
// 示例:一个1024b大小的文件,压缩后大小为768b,minRatio : 0.75
minRatio: 0.8, // 默认: 0.8
// 是否删除源文件,默认: false
deleteOriginalAssets: false
}));
}
});