forked from ecomfe/react-hooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.umirc.js
57 lines (57 loc) · 1.15 KB
/
.umirc.js
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
const fillPrefix = (filePath) => {
let prefix = process.env.NODE_ENV === 'production' ? '/react-hooks/' : '/';
if (typeof filePath === 'string') {
return prefix + filePath;
} else {
return '';
}
};
export default {
mode: "site",
title: "huse",
// favicon: '/simple-logo.svg',
logo: fillPrefix('huse.svg'),
links: [
{ rel: 'stylesheet', href: fillPrefix('style.css') },
],
// hash: true,
resolve: {
includes: ["docs", "packages"],
},
history: {
type: "hash",
},
publicPath: process.env.CI ? "/react-hooks/" : "/",
extraBabelPlugins: [
[
"babel-plugin-import",
{
libraryName: "antd",
libraryDirectory: "es",
style: true,
},
"antd",
],
[
"babel-plugin-import",
{
libraryName: "@alifd/next",
style: false,
},
"fusion",
],
],
locales: [
["en-US", "English"],
["zh-CN", "中文"],
],
navs: {
"zh-CN": [
null,
{ title: 'GitHub', path: 'https://github.com/ecomfe/react-hooks' }
],
"en-US": [null,
{ title: 'GitHub', path: 'https://github.com/ecomfe/react-hooks' }
],
},
};