M
M
mrrangerr2021-03-05 07:36:39
React
mrrangerr, 2021-03-05 07:36:39

How to set proxy for webpack correctly?

Hello everyone, how to properly configure a proxy for webpack?
Here is my config

devServer: {
    contentBase: path.join(__dirname, 'prod'),
    port: 3000,
    hot: true,
    historyApiFallback: true,
    proxy: {
//url бэка	'http://192.168.100.110:44500': {
    ///url фронта		target: 'http://localhost:3000/',
      }
    }
    }
  },

I'm trying to send a PUT request, two other GET requests are sent instead

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question