text: const path = require("path");
  const HtmlWebpackPlugin = require("html-webpack-plugin");
  const MiniCssExtractPlugin = require("mini-css-extract-plugin");
  const CssMiniMizerWebpackPlugin = require("css-minimizer-webpack-plugin");
  
  module.exports = {
    entry: "./src/index.js",
  
    output: {
      filename: "bundle.js",
      path: path.resolve(__dirname, "./dist"),
      clean: true,
      assetModuleFilename: "images/[contenthash][ext]",
    },
  
    mode: "production",
  
    devtool: "inline-source-map",
  
    plugins: [
      new HtmlWebpackPlugin({
        template: "./index.html",
        filename: "app.html",
        inject: "body",
      }),
      new MiniCssExtractPlugin({
        filename: "styles/[contenthash].css",
      }),
    ],
  
    devServer: {
      static: "./dist",
    },
  
    module: {
      rules: [
        {
          test: /\.png/,
          type: "asset/resource",
          generator: {
            filename: "images/[contenthash][ext]",
          },
        },
        {
          test: /\.(css|less)/,
          use: [MiniCssExtractPlugin.loader, "css-loader", "less-loader"],
        },
  
        {
          test: /\.js$/,
          exclude: /node_modules/,
          use: {
            loader: "babel-loader",
            options: {
              presets: ["@babel/preset-env"],
              plugins: [["@babel/plugin-transform-runtime"]],
            },
          },
        },
      ],
    },
    optimization: {
      minimizer: [new CssMiniMizerWebpackPlugin()],
    },
    performance: {
      hints: false,
    },
  };
  