text: const path = require("path");
  
  const { CleanWebpackPlugin } = require("clean-webpack-plugin");
  const HtmlWebpackPlugin = require("html-webpack-plugin");
  
  const config = {
    entry: "./src/script.ts",
    output: {
      path: path.resolve(__dirname, "build"),
      filename: "bundle.js"
    },
    devServer: {
      contentBase: "./build"
    },
    module: {
      rules: [
        {
          test: /\.worker\.ts$/,
          loader: "worker-loader"
        },
        {
          test: /\.ts$/,
          loader: "ts-loader",
          exclude: /node_modules/
        }
      ]
    },
    resolve: {
      extensions: [".ts", ".js"]
    },
    plugins: [
      new CleanWebpackPlugin(),
      new HtmlWebpackPlugin({
        inject: true,
        template: "public/index.html"
      })
    ]
  };
  
  module.exports = config;
  