text: const HtmlWebpackPlugin = require("html-webpack-plugin");
  const copyPlugin = require("copy-webpack-plugin");
  
  module.exports = {
      module: {
          rules: [
              {
                  test: /.html$/,
                  use: [
                      {
                          loader: "html-loader"
                      }
                  ]
              },
              {
                  test: /.js$/,
                  exclude: /node_modules/,
                  use: {
                      loader: "babel-loader",
                      options: {
                          presets: ["@babel/preset-env"]
                      }
                  }
              }
          ]
      },
  
      plugins: [
          new HtmlWebpackPlugin({
              template: "./src/index.html",
              filename: "./index.html"
          }),
  
          new copyPlugin({
              patterns: [{
                  from: "./src/assets",
                  to: "assets",
                  noErrorOnMissing: true
              }]
          })
      ]
  }