-
Notifications
You must be signed in to change notification settings - Fork 0
/
.roadhogrc.js
49 lines (47 loc) · 1.22 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
const path = require('path');
const pxtorem = require('postcss-pxtorem');
const svgSpriteDirs = [
require.resolve('antd-mobile').replace(/warn\.js$/, ''), // antd-mobile 内置svg
path.resolve(__dirname, 'src/svg/'), // 业务代码本地私有 svg 存放目录
];
export default {
entry: 'src/index.js',
svgSpriteLoaderDirs: svgSpriteDirs,
"publicPath": "./",
"theme": "./theme.config.js",
// 接口代理示例
// "proxy": {
// "/api": {
// "target": "http://192.168.1.66:8099",
// "changeOrigin": true,
// "pathRewrite": { "^/api" : "/" }
// },
// },
env: {
development: {
extraBabelPlugins: [
'dva-hmr',
'transform-runtime',
['import', { 'libraryName': 'antd-mobile', 'libraryDirectory': 'lib', 'style': true }]
],
extraPostCSSPlugins: [
pxtorem({
rootValue: 100,
propWhiteList: [],
}),
],
},
production: {
extraBabelPlugins: [
'transform-runtime',
['import', { 'libraryName': 'antd-mobile', 'libraryDirectory': 'lib', 'style': true }]
],
extraPostCSSPlugins: [
pxtorem({
rootValue: 100,
propWhiteList: [],
}),
],
}
}
}