title: Implementing historyApiFallback for webpack-dev-middleware
body: <p>I am using an express server for dev. I am using webpack-dev-middleware for the webpack config. I want to implement the equivalent of historyApiFallback using express.</p>
  
  <p>historyApiFallback is available with webpack-dev-server. Whenever there is a 404 error, it will ignore sending a 404 and let the client handle the routing via history api. </p>
  
  <p>How can I get it to work with express and webpack-dev-middleware?</p>
  
  <pre><code>const webpackMiddleware = require('webpack-dev-middleware');
  const webpack = require('webpack');
  const webpackConfig = require('../webpack.config.js');
  app.use(webpackMiddleware(webpack(webpackConfig), { publicPath: '/' }));
  </code></pre>