I think this pit is the biggest pit I have encountered recently. I have searched a lot of information and it seems that there is no similar situation.
I’ve created a VUE3 + TS project, I’m going to build a project for my colleagues, and I’ve deployed an easy-Mock service to my development environment. I just need to log in with simulated data.
// The following **** represents the IP address of the company's development server
'/easy-mock': {
target: 'http://****/mock/60d5d5fa3f73a61f21b57aba/fontend'.changeOrigin: true.ws: true.secure: false.pathRewrite: {
'^/easy-mock': '/'}}Copy the code
As a result, the interface kept reporting 404 error, unless the direct connection is not, as long as the forwarding interface is 404, the whole afternoon is like this, the mind is blown up. Behind thought ?????????? Is it because my vue.config file is ts version?? , holding the mentality of trying to adjust the next file suffix, the key to come, actually really can!!!!! “, both happy contradiction, this is why? Why doesn’t the TS version work, but the JS version does? If anyone knows, please let me know in the comments