-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.umirc.js
60 lines (59 loc) · 1.51 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
58
59
60
import path from 'path'
// ref: https://umijs.org/config/
export default {
publicPath: '/',
define: {
"__VERSION__": require('./package.json').version,
"process.env.YL_NODE_ENV": process.env.YL_NODE_ENV,
},
exportStatic: {},
plugins: [
// ref: https://umijs.org/plugin/umi-plugin-react.html
['umi-plugin-react', {
antd: true,
dva: {
immer: true
},
// hd: true, // h5 高清
dynamicImport: {
webpackChunkName: true,
loadingComponent: './components/PageLoading',
},
title: 'yunle-template-umi',
dll: {
exclude: [],
include: ["dva", "dva/router", "dva/saga", "dva/fetch", "antd/es"],
},
routes: {
exclude: [
/model\.(j|t)sx?$/,
/service\.(j|t)sx?$/,
/models\//,
/components\//,
/node_modules\//,
/services\//,
/utils\//,
],
},
alias:{
components: path.resolve(__dirname, 'src/components'),
utils: path.resolve(__dirname, 'src/utils'),
services: path.resolve(__dirname, 'src/services'),
models: path.resolve(__dirname, 'src/models'),
},
// externals: {
// 'react': 'window.React',
// 'react-dom': 'window.ReactDOM',
// 'react-router-dom': 'window.ReactRouterDOM'
// },
targets: {
ie: 9,
},
theme: {
"@primary-color": "#FA1C30",
"@brand-primary-tap": "#FA1C30"
},
hardSource: false,
}],
],
}