const webpack = require("webpack"); const HtmlWebpackPlugin = require("html-webpack-plugin"); module.exports = { entry: "./src/index.js", output: { filename: "bundle.[hash].js", publicPath: "/", }, target: "web", resolve: { alias: { "react-dom": "@hot-loader/react-dom", }, }, module: { rules: [ { test: /\.(js)$/, exclude: /node_modules/, use: ["babel-loader"], }, { test: /\.css$/i, use: ["style-loader", "css-loader"], }, { test: /\.s[ac]ss$/i, use: ["style-loader", "css-loader", "sass-loader"], }, { test: /\.(png|svg|jpg|jpeg|gif)$/i, type: "asset/resource", }, ], }, plugins: [ new webpack.HotModuleReplacementPlugin(), new HtmlWebpackPlugin({ template: "public/index.html", favicon: "public/favicon.ico", }), ], };