text: const HtmlWebpackPlugin = require("html-webpack-plugin");
  const MiniCssExtractPlugin = require("mini-css-extract-plugin");
  const path = require("path");
  
  module.exports = {
      mode: "production",
      entry: "./src/index.ts",
      output: {
          path: path.resolve(__dirname, "dist/"),
          filename: "[name].bundle.js",
      },
      plugins: [
          new HtmlWebpackPlugin({
              title: "torchwrite",
              filename: "index.html",
              template: "./src/index.ejs",
          }),
          new MiniCssExtractPlugin()
      ],
      module: {
          rules: [
              {
                  test: /\.ts$/i,
                  loader: "ts-loader",
                  exclude: /node_modules/,
                  options: {
                      compilerOptions: {
                          declaration: false,
                          noEmit: false,
                      },
                  },
              },
              {
                  test: /\.css$/i,
                  use: [MiniCssExtractPlugin.loader, "css-loader"],
              },
          ],
      },
      resolve: {
          modules: [
              path.resolve(__dirname, "src/"),
              path.resolve(__dirname, "node_modules/"),
          ],
          extensions: [".ts", ".js"],
      },
  };
  