text: const path = require("path")
  const webpack = require("webpack")
  
  module.exports = {
    entry: ["react-hot-loader/patch", "./src/index.js"],
    mode: "development",
    module: {
      rules: [
        {
          test: /\.(js|jsx)$/,
          exclude: /(node_modules|bower_components)/,
          loader: "babel-loader",
          options: { presets: ["@babel/env"] },
        },
        {
          test: /\.s?css$/,
          use: ["style-loader", "css-loader", "sass-loader"],
        },
      ],
    },
    resolve: {
      extensions: ["*", ".js", ".jsx"],
      alias: {
        "react-dom": "@hot-loader/react-dom",
      },
    },
    output: {
      path: path.resolve(__dirname, "dist/"),
      publicPath: "/dist/",
      filename: "bundle.js",
    },
    devServer: {
      contentBase: path.join(__dirname, "public/"),
      port: 8080,
      publicPath: "http://localhost:8080/dist/",
      hotOnly: true,
    },
    plugins: [new webpack.HotModuleReplacementPlugin()],
  }
  