forked from KuChainNetwork/portal-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.umirc.js
More file actions
75 lines (73 loc) · 1.84 KB
/
.umirc.js
File metadata and controls
75 lines (73 loc) · 1.84 KB
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
72
73
74
75
const { name, version } = require('./package.json');
const { NODE_ENV } = process.env;
const _DEV_ = NODE_ENV !== 'production';
// publicPath, for cdn link
const publicPath = _DEV_ ? '/' : `/${version}/`;
// ref: https://umijs.org/config/
export default {
treeShaking: true,
publicPath,
ignoreMomentLocale: true,
plugins: [
// ref: https://umijs.org/plugin/umi-plugin-react.html
['umi-plugin-react', {
antd: true,
dva: true,
dynamicImport: { webpackChunkName: true },
title: 'KuChain',
dll: true,
locale: {
antd: true,
enable: true,
default: 'en-US',
baseNavigator: true,
},
routes: {
exclude: [
/models\//,
/services\//,
/themes\//,
/model\.(t|j)sx?$/,
/service\.(t|j)sx?$/,
/components\//,
/utils\//,
],
},
links: [{ rel: 'shortcut icon', href: '<%= PUBLIC_PATH %>favicon.png' }],
}]
],
theme: {
'kc-limit-width': '1200px',
'kc-mb-width': '600px',
'primary-color': '#0FCD8C',
'btn-primary-color': '#01081E',
'tooltip-color': 'rgba(0,0,0,0.65)',
'tooltip-bg': '#FFF',
},
alias: {
src: `${__dirname}/src/`,
helper: `${__dirname}/src/helper.js`,
config: `${__dirname}/src/config.js`,
models: `${__dirname}/src/models/`,
services: `${__dirname}/src/services/`,
utils: `${__dirname}/src/utils/`,
assets: `${__dirname}/src/assets/`,
components: `${__dirname}/src/components/`,
},
define: {
_DEV_,
_PUBLIC_PATH_: publicPath,
_RELEASE_: `${name}_${version}`,
},
chainWebpack(config) {
config.module
.rule('exclude')
.use('url-loader')
.tap(options => {
return {
...options,
limit: 10, // Set to extremely low values, stop processing
};
});
},
}