text: const HtmlWebpackPlugin = require("html-webpack-plugin");
  const path = require("path");
  
  module.exports = {
    mode: "development",
    entry: "./src/index.js",
    target: "web",
    output: {
      filename: "bundle.[hash].js",
      path: path.resolve(__dirname, "dist"),
    },
    plugins: [
      new HtmlWebpackPlugin({
        template: "./public/index.html",
      }),
    ],
    resolve: {
      modules: [__dirname, "src", "node_modules"],
      extensions: ["*", ".js", ".jsx", ".tsx", ".ts"],
    },
    performance: {
      hints: false,
      maxEntrypointSize: 512000,
      maxAssetSize: 512000,
    },
    module: {
      rules: [
        {
          test: /\.jsx?$/,
          exclude: /node_modules/,
          loader: require.resolve("babel-loader"),
        },
        {
          test: /\.css$/,
          use: ["style-loader", "css-loader"],
        },
        {
          test: /\.png|svg|jpg|gif$/,
          use: ["file-loader"],
        },
      ],
    },
    externals: {
      express: "require('express')",
    },
    devServer: {
      port: 8080,
      historyApiFallback: true,
    },
  };
  