text: const path = require('path');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  
  module.exports = {
    entry: './client/index.js',
    mode: process.env.NODE_ENV,
    output: {
      path: path.resolve(__dirname, 'build'),
      filename: 'bundle.js',
    },
    devServer: {
      historyApiFallback: true,
      proxy: {
        '/': 'http://localhost:3000',
      },
      publicPath: '/build',
    },
    devtool: 'source-map',
    module: {
      rules: [
        {
          test: /\.(js|jsx)$/,
          exclude: /(node_modules)/,
          use: {
            loader: 'babel-loader',
            options: {
              presets: ['@babel/preset-env', '@babel/preset-react'],
            },
          },
        },
        {
          test: /\.(css|scss)$/i,
          use: ['style-loader', 'css-loader', 'sass-loader'],
        },
        {
          test: /\.(jpg|jpeg|png)$/,
          use: {
            loader: 'url-loader',
          },
        },
      ],
    },
    plugins: [
      new HtmlWebpackPlugin({
        template: 'client/index.html',
      }),
    ],
  };
  