-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack 配置代理后路由跳转有问题 #13
Comments
webpack 配置是没有问题的是跳转的路由不正确,这是个问题,我们改一下。 |
改好了吗?还是存在这个问题 |
以上问题实质上是由于 history 特性造成的,history 模式不像 hash 模式,用 # 来区分前后端路由,可以增加下述两行代码避免 history 下后端代理失效(实质上是 webpack-dev-server少了配置) inline: true
historyApiFallback: true webpack.config.js 该部分完整配置如下: config.devServer = {
inline: true,
historyApiFallback: true,
proxy: {
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
pathRewrite: {
'^/api': ''
},
},
}
} |
@Queensbarry 这个可以在Arco Pro 最佳实践 加个示例? |
可以的,近期的版本会加上。 |
大佬,您这张截图,不是官网的截图,是您自己本地的吧? |
这个是 1.* 版本的时候写的了,现在应该是写在 |
Basic Info
What is expected?
登陆成功后,正常跳转
Steps to reproduce
如果有登陆,先退出登陆
The text was updated successfully, but these errors were encountered: