当我配置我的 .roadhogrc 时,roadhog 的文档说我可以将“代理”属性设置为与webpack-dev-server#proxy相同。
我添加了一个“路由器”道具,然后由于“index.css”超时,我的页面无法加载。
那么,如何在 .roadhogrc 中使用“代理”?或者有什么方法可以改变 api 来测试 localhost 中的环境?
我找不到“dva”或“roadhog”标签,很抱歉使用“antd”标签。
{
"entry": "src/index.js",
"env": {
"development": {
"extraBabelPlugins": [
"dva-hmr",
"transform-runtime",
["import", { "libraryName": "antd", "style": "css" }]
],
"proxy":{
"router":{
"http://api.eshop.corploft.com" : "http://test.corploft.com"
}
}
},
"production": {
"extraBabelPlugins": [
"transform-runtime",
["import", { "libraryName": "antd", "style": "css" }]
],
"outputPath":"build/yijiayi"
}
}
}