-
Notifications
You must be signed in to change notification settings - Fork 120
/
Copy path.dumirc.ts
34 lines (31 loc) · 832 Bytes
/
.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
import { defineConfig } from 'dumi';
import path from 'path';
let base: string | undefined;
let publicPath: string | undefined;
// Github Pages 部署时需要更换为自己的仓库名
if (process.env.NODE_ENV === 'production' && process.env.PREVIEW !== '1') {
base = '/react-ui-library-tutorial/';
publicPath = '/react-ui-library-tutorial/';
}
export default defineConfig({
base,
publicPath,
title: 'Happy UI',
outputPath: 'doc-site',
resolve: {
docDirs: ['docs'],
atomDirs: [{ type: 'component', dir: 'src' }],
},
exportStatic: {},
forkTSChecker: {},
extraBabelPlugins: [
[
'import',
{
libraryName: '@zzzzw/happy-ui',
libraryDirectory: '',
customStyleName: (name: string) => path.resolve(__dirname, `src/${name}/style/index.ts`),
},
],
],
});