- Configure the proxy in the server
server: {
host: true,
port: VITE_PORT as unknown as number,
https: false,
proxy: {
'/dev': 'http://10.63.80.113:8000'
}
}
-
After configuration, it is equivalent to replacing the actual request path with http://10.63.80.113:8000/dev
, that is, adding the key value in the proxy object before the key name