-
Notifications
You must be signed in to change notification settings - Fork 93
/
Copy path.roadhogrc.js
81 lines (79 loc) · 2.7 KB
/
.roadhogrc.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
const path = require('path')
const { version } = require('./package.json')
const svgSpriteDirs = [
path.resolve(__dirname, 'src/svg/'),
require.resolve('antd').replace(/index\.js$/, '')
]
export default {
entry: 'src/index.js',
svgSpriteLoaderDirs: svgSpriteDirs,
theme: "./theme.config.js",
hash: true,
publicPath : `/${version}/`,
outputPath : `./dist/${version}`,
autoprefixer : {
browsers : [
"iOS >= 8" ,
"Android >= 4"
]
} ,
env: {
development: {
extraBabelPlugins: [
'dva-hmr',
'transform-runtime',
['import', { 'libraryName': 'antd', 'style': true }],
["module-resolver", {
root: ["./src"],
alias: {
components: `${__dirname}/src/components`,
utils: `${__dirname}/src/utils`,
config: `${__dirname}/src/utils/config`,
services: `${__dirname}/src/services`,
models: `${__dirname}/src/models`,
routes: `${__dirname}/src/routes`,
constants: `${__dirname}/src/constants`,
themes: `${__dirname}/src/themes`,
}
}]
],
define: {
'newband.app.admin.ISMOCK': true,
'newband.app.admin.API_HOST': 'http://ec2-54-223-130-122.cn-north-1.compute.amazonaws.com.cn:81/v2',
'newband.app.admin.CLIENT_ID': '8_458xy3o1w2g4cgwkk0ksgs0kkkw8o4soc000g004csoo840og4',
'newband.app.admin.CLIENT_SECRET': '2iwh0zfunzswgss8s0ks4scoo4w080sskcowgkoc0s8swg8goo',
'newband.app.admin.GRANT_TYPE': 'client_credentials'
},
},
production: {
extraBabelPlugins: [
'transform-runtime',
['import', { 'libraryName': 'antd', 'style': true }],
["module-resolver", {
root: ["./src"],
alias: {
components: `${__dirname}/src/components`,
utils: `${__dirname}/src/utils`,
config: `${__dirname}/src/utils/config`,
services: `${__dirname}/src/services`,
models: `${__dirname}/src/models`,
routes: `${__dirname}/src/routes`,
constants: `${__dirname}/src/constants`,
themes: `${__dirname}/src/themes`,
}
}]
],
define: {
'newband.app.admin.ISMOCK': true,
'newband.app.admin.API_HOST': 'http://ec2-54-223-130-122.cn-north-1.compute.amazonaws.com.cn:81/v2',
'newband.app.admin.CLIENT_ID': '8_458xy3o1w2g4cgwkk0ksgs0kkkw8o4soc000g004csoo840og4',
'newband.app.admin.CLIENT_SECRET': '2iwh0zfunzswgss8s0ks4scoo4w080sskcowgkoc0s8swg8goo',
'newband.app.admin.GRANT_TYPE': 'client_credentials'
},
}
},
dllPlugin : {
exclude: ["babel-runtime"],
include: ["dva/router", "dva/saga", "dva/fetch"]
}
}