-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.dumirc.ts
44 lines (40 loc) · 1.03 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
import { defineConfig } from 'dumi';
import path from 'path';
let base: string | undefined;
let publicPath: string | undefined;
if (process.env.DUMI_ENV) {
process.env.NODE_ENV = process.env.DUMI_ENV;
}
// console.log(process.env.NODE_ENV);
// Github Pages 部署时需要更换为自己的仓库名
if (process.env.NODE_ENV === 'production' && process.env.PREVIEW !== '1') {
base = '/fantasy-ui-react/';
publicPath = '/fantasy-ui-react/';
}
export default defineConfig({
base,
publicPath,
title: 'Fantasy UI',
outputPath: 'doc-site',
resolve: {
docDirs: ['docs'],
atomDirs: [{ type: 'component', dir: 'src' }],
},
links: [
{rel: "icon", href: "/fantasy955logo2.png"},
],
logo: "/fantasy955logo2.png",
exportStatic: {},
forkTSChecker: {},
extraBabelPlugins: [
[
'import',
{
libraryName: '@fantasy955/fantasy-ui-react',
libraryDirectory: '',
customStyleName: (name: string) =>
path.resolve(__dirname, `src/${name}/style/index.ts`),
},
],
],
});