const HtmlWebpackPlugin = require('html-webpack-plugin')
const webpack = require('webpack')

module.exports = {
  mode: 'development',
  output: {
    filename: 'static/[name].js',
    publicPath: '/',
  },
  module: {
    rules: [
      {
        test: /\.elm$/,
        exclude: [/elm-stuff/, /node_modules/],
        use: [
          { loader: 'elm-hot-webpack-loader' },
          {
            loader: 'elm-webpack-loader',
            options: {
              debug: true
            },
          },
        ],
      },
      {
        test: /\.css$/,
        exclude: [/node_modules/],
        loader: ['style-loader', 'css-loader'],
      },
    ]
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: 'public/index.html',
      favicon: 'public/favicon.png',
    }),
    new webpack.HotModuleReplacementPlugin(),
  ],
  devServer: {
    inline: true,
    hot: true,
    stats: { colors: true },
    proxy: [{
      context: ['/api', '/debug', '/serve'],
      target: 'http://localhost:9000',
      ws: true,
    }],
  },
};

@@ -857,24 +857,54 @@
 line: true,%0A
+    historyApiFallback: true,%0A
     hot: tru
@@ -931,24 +931,59 @@
 rs: true %7D,%0A
+    overlay: true,%0A    open: true,%0A
     proxy: %5B
@@ -1092,16 +1092,74 @@
     %7D%5D,%0A
+    watchOptions: %7B%0A      ignored: /node_modules/,%0A    %7D,%0A
   %7D,%0A%7D;%0A

Enable compile-error dev server overlay, SPA routing