Any help would be really appreciated on this issue.
I want to set the proxy target dynamically inside webpack index.js
proxyTable: {
'/api': {
target: 'http://' + window.location.hostname.split('.')[0] + '.example.com',
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
}
},
and webpack is giving error ReferenceError: window is not defined