Proxy requests using Webpack dev server to avoid cors in development mode.
In your webpack.config file add:
"devServer":{
"proxy": {
"/api": {
"target": 'https://my-target.com',
"pathRewrite": { '^/api': '' },
Proxy requests using Webpack dev server to avoid cors in development mode.
In your webpack.config file add:
"devServer":{
"proxy": {
"/api": {
"target": 'https://my-target.com',
"pathRewrite": { '^/api': '' },