/* eslint  @typescript-eslint/no-var-requires: off */

const { merge } = require('webpack-merge');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const common = require('./webpack.common.js');

module.exports = merge(common, {
  mode: 'development',
  devtool: 'inline-source-map',
  output: {
    publicPath: '/app/'
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: '!!handlebars-loader!html/index.html',
      templateParameters: {
        jsConfig: '{ auth: { google: true, yahoo: true } }'
      },
      historyApiFallback: true
    })
  ],
  devServer: {
    host: 'localhost',
    open: true,
    openPage: 'app',
    historyApiFallback: {
      rewrites: [{ from: /app.*/, to: '/app/index.html' }],
      verbose: true
    },
    overlay: true,
    dev: {
      publicPath: '/app'
    },
    proxy: {
      '/socket.io': {
        target: 'http://localhost:3200',
        ws: true
      },
      '/': {
        target: 'http://localhost:3200'
      }
    }
  }
});

@@ -642,121 +642,8 @@
 p',%0A
-    historyApiFallback: %7B%0A      rewrites: %5B%7B from: /app.*/, to: '/app/index.html' %7D%5D,%0A      verbose: true%0A    %7D,%0A
     
@@ -664,24 +664,41 @@
 %0A    dev: %7B%0A
+      index: '',%0A
       public
@@ -871,16 +871,170 @@
 st:3200'
+,%0A        bypass: req =%3E %7B%0A          if (req.url.startsWith('/app')) %7B%0A            return '/app/index.html';%0A          %7D%0A%0A          return null;%0A        %7D
 %0A      %7D

Fix dev server routing