D
D
Dmitry2021-11-03 18:00:29
open server
Dmitry, 2021-11-03 18:00:29

How to connect Webpack 5 (devServer) to Open Server to read PHP files?

Good day.
Please tell me how you can set up your webpack assembly to work with Open Server, so that I can also track not only HTML but also PHP files through devServer and the database so that it works with all this.
I read that you need to make the proxy parameter for devServer, but it did not work out. The npm start command opens the Open Server start page.
Thanks a lot!!!

devServer: {
    historyApiFallback: true,
    contentBase: paths.build,
    open: true,
    compress: true,
    watchContentBase: true,
    port: 3000,
    proxy: {
      '**': {
        target: 'http://my.site/'
      },
    },
  },

Now this is
the result
6182a72322298376600714.png

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