【发布时间】:2016-01-19 22:30:41
【问题描述】:
这里是路线配置:
<Route path='/' component={CoreLayout}>
<IndexRoute component={HomeView}/>
<Route path='/404' component={NotFoundView}/>
<Redirect from='*' to='/404'/>
</Route>
这是 webpack-dev-server 的代理配置:
proxy: {
'/service': 'http://localhost:8080'
}
express 服务器监听 3000 端口。
我希望所有发送到http://localhost:3000/service 的请求都会被转移到http://localhost:8080,但是似乎react-router 处理了所有请求并且代理不起作用。
任何机构都知道如何解决这个问题?提前谢谢你
【问题讨论】:
-
您找到解决方案了吗?
标签: react-router webpack-dev-server