-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.umirc.ts
71 lines (69 loc) · 1.88 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
63
64
65
66
67
68
69
70
71
/*
* @Description:
* @version: 1.0
* @Author: 赵卓轩
* @Date: 2021-09-29 18:40:12
* @LastEditors: 赵卓轩
* @LastEditTime: 2022-05-18 16:13:34
*/
import { IConfig } from 'umi-types';
// ref: https://umijs.org/config/
const config: IConfig = {
treeShaking: true,
// 配置less
theme: {
"@grey-color": '#F6F6F6'
},
// 代理到其他服务器
proxy: {
"/api": {
"target": "",
"changeOrigin": true,
"pathRewrite": {"^/api": "/api"}
},
"/mock": {
"target": "",
"changeOrigin": true,
"pathRewrite": {"^/mock": ""}
}
},
routes: [
{ path: '/', component: '../pages/user/login/index'},
{
path: '/',
component: '../layouts/index',
Routes: ['src/pages/components/Authorized/index'],
routes: [
{ path: '/', component: '../pages/articles/index' },
{ path: '/articles', component: '../pages/articles/index'},
{ path: '/articles/detail', component: '../pages/articles/details/index'},
{ path: '/articles/write', component: '../pages/articles/writeArticle/index'},
{ path: '/articles/video', component: '../pages/articles/videoDetail/index'},
{ path: '/searchResult', component: '../pages/articles/searchResult/index'},
{ path: '/chat', component: '../pages/chat/index'},
{ path: '/explore', component: '../pages/explore/index'},
{ path: '/waiting', component: '../pages/waiting/index' }
]
}
],
plugins: [
// ref: https://umijs.org/plugin/umi-plugin-react.html
['umi-plugin-react', {
antd: true,
dva: false,
// 路由懒加载
dynamicImport: true,
title: '知乎',
dll: false,
routes: {
exclude: [
/components\//,
],
},
links: [
{ rel: 'icon', href: '<%= PUBLIC_PATH %>static/icon.png' }
]
}],
]
}
export default config;