K
K
Ken Jee2019-06-14 10:51:12
React
Ken Jee, 2019-06-14 10:51:12

How can Webpack Dev Server for React have a single entry point for all requests?

For the Webpack Dev Server, do I need to make sure that all requests that come into it are processed by one entry point? Those. so that GET /, GET /about requests, etc. index.html was always given. This is necessary so that in the React project, being on any URL, do page updates like Ctrl + R ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-06-14
@Machez

module.exports = {
  //...
  devServer: {
    historyApiFallback: true
  }
};

devServer.historyApiFallback

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question