text: const path = require("path");
  const HtmlWebpackPlugin = require("html-webpack-plugin");
  
  module.exports = {
    mode: "development",
  
    entry: "./src/index.tsx",
  
    output: {
      path: path.resolve(__dirname, "dist"),
      filename: "index.js",
      publicPath: "/"
    },
  
    resolve: {
      extensions: [".js", ".json", ".ts", ".tsx"],
    },
  
    devtool: "source-map",
  
    module: {
      rules: [
        {
          test: /\.tsx?$/,
          use: "ts-loader",
        },
      ],
    },
    devServer: {
      static: {
        directory: `${__dirname}/static`
      },
      hot: true,
      historyApiFallback: true,
    },
  
    plugins: [
      new HtmlWebpackPlugin({
        template: "./static/index.html",
      }),
    ]
  };
  