How to tell webpack dev server to serve index.html for any route

I found the easiest solution to include a small config:

  devServer: {
    port: 3000,
    historyApiFallback: {
      index: 'index.html'
    }
  }

I found this by visiting: PUSHSTATE WITH WEBPACK-DEV-SERVER.

Leave a Comment