-
Notifications
You must be signed in to change notification settings - Fork 3
/
.umirc.js
executable file
·46 lines (45 loc) · 1.3 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
import { resolve } from 'path';
export default {
plugins: [
[
'umi-plugin-react',
{
dva: true,
antd: true, // antd 默认不开启,如有使用需自行配置
routes: {
exclude: [
/model\.[jt]sx?$/,
/\.test\.[jt]sx?$/,
/service\.[jt]sx?$/,
/models\//,
/components/,
/services\//,
],
},
dynamicImport: {
webpackChunkName: true,
loadingComponent: './components/PageLoading',
},
dll: {
include: ['dva', 'dva/router', 'dva/saga', 'dva/fetch', 'antd/es'],
},
},
],
],
theme: './src/styles/themes/theme.js',
alias: {
'@/components': resolve(__dirname, './src/components'),
'@/utils': resolve(__dirname, './src/utils'),
'@/services': resolve(__dirname, './src/services'),
'@/common': resolve(__dirname, './src/common'),
'@/assets': resolve(__dirname, './src/assets'),
'@/typings': resolve(__dirname, './typings'),
'@/mock': resolve(__dirname, './mock'),
'@/data': resolve(__dirname, './data'),
'@/src': resolve(__dirname, './src'),
styles: resolve(__dirname, './src/styles'), // less 全局样式文件
},
proxy: {
'/api/v1': 'http://127.0.0.1:7001/api/v1/',
},
};