"proxy": {
"/auth/google": {
"target": "http://localhost:5001"
},
"/api/user": {
"target": "http://localhost:5001"
}
},
答案 0 :(得分:1)
解决了这个问题,我应该在webpack.config.js文件中设置代理
devServer: {
historyApiFallback:true,
proxy:{
"/api/user":"http://localhost:5001"
}
}