0๐
โ
My guess was right
devServer
property just works for development environments,
I created axios instance with baseUrl = http://HOST_IP:PORT/
where you should replace host_ip and port with actual values
import axios from 'axios'
export default axios.create({
baseURL: process.env.NODE_ENV === 'development' ? '/' : 'http://xxx.xx.xxx.xx:yyyy/',
});
Source:stackexchange.com