-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.roadhogrc.js
43 lines (42 loc) · 995 Bytes
/
.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
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/my-project-svg-foler'), // 业务代码本地私有 svg 存放目录
];
export default {
entry: "src/index.js",
extraBabelPlugins: [
["import", { "style": "css", "libraryName": "antd-mobile" }],
],
env: {
development: {
"extraBabelPlugins": [
"transform-decorators-legacy",
"dva-hmr",
"transform-runtime",
],
},
production: {
"extraBabelPlugins": [
"transform-runtime"
]
}
},
watchDelay: 2000,
extraPostCSSPlugins: [
pxtorem({
rootValue: 100,
propWhiteList: [],
}),
],
svgSpriteLoaderDirs: svgSpriteDirs,
proxy: {
"/api": {
target: "http://jsonplaceholder.typicode.com/",
changeOrigin: true,
pathRewrite: { "^/api" : "" }
}
}
//...
}