-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.dumirc.ts
38 lines (36 loc) · 1.26 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
import { defineConfig } from 'dumi';
import path from 'path';
const repo = 'litecase-ui';
export default defineConfig({
base: process.env.NODE_ENV === 'production' ? `/${repo}/` : '/',
publicPath: process.env.NODE_ENV === 'production' ? `/${repo}/` : '/',
outputPath: 'docs-dist',
locales: [
{ id: 'en-US', name: 'English' },
{ id: 'zh-CN', name: '中文' },
],
// NOTE: 设置此项可以在编写.md demo时,可以直接使用最终发布的npm包模式,e.g. import { Button } 'litecase-ui'
alias: {
'litecase-ui': path.resolve(__dirname, './packages'),
'@litecase-ui/icons': path.resolve(__dirname, './packages/icons'),
},
resolve: {
// NOTE: 有时候配置这个可能是.md文件中import会报错 例如: import { Foo } from 'litecase-ui'
atomDirs: [{ type: 'component', dir: 'packages/ui/src/components' }],
},
themeConfig: {
name: 'litecase ui',
nav: {
'en-US': [
{ title: 'Guide', link: '/guide' },
{ title: 'Components', link: '/components' },
],
'zh-CN': [{ title: '指南', link: '/zh-CN/guide' }],
},
socialLinks: {
github: 'https://github.com/LantzShaw/litecase-ui',
},
footer: false,
// footer: 'Copyright © 2023-present | Powered by litecase',
},
});