text: const path = require('path');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
  
  module.exports = {
    devServer: {
      historyApiFallback: true,
      contentBase: './',
      hot: true,
    },
    entry: './src/index',
    output: {
      path: path.join(__dirname, '/dist'),
      filename: 'bundle.js',
      publicPath: '/',
    },
    resolve: {
      extensions: ['.ts', '.tsx', '.js'],
    },
    optimization: {
      minimizer: [new UglifyJsPlugin({ test: /\.(ts|js)x?$/ })],
    },
    module: {
      rules: [
        {
          test: /\.(ts|js)x?$/,
          exclude: /node_modules/,
          use: {
            loader: 'babel-loader',
          },
        },
      ],
    },
    plugins: [
      new HtmlWebpackPlugin({
        template: './src/index.html',
        favicon: './public/favicon.ico',
      }),
    ],
  };
  