const path = require("path"); const HtmlWebpackPlugin = require("html-webpack-plugin"); module.exports = { entry: "./src/index.tsx", output: { filename: "main.js", path: path.resolve(__dirname, "dist"), }, module: { rules: [ { test: /\.(ts|tsx)$/, exclude: /node_modules/, use: "babel-loader", }, { test: /\css$/, use: [ { loader: "style-loader", }, { loader: "css-loader", }, ], }, ], }, plugins: [ new HtmlWebpackPlugin({ template: "./src/index.html", }), ], };