text: const webpack = require('webpack');
  const { resolve } = require('path');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  
  module.exports = {
  
    mode: 'development',
    entry: [
      'webpack-dev-server/client?http://localhost:8080',
      'webpack/hot/only-dev-server',
      resolve(__dirname, 'src') + '/index.jsx'
    ],
  
    output: {
      filename: 'app.bundle.js',
      path: resolve(__dirname, 'build'),
    },
  
    resolve: {
      extensions: [ '.js', '.jsx' ]
    },
  
    module: {
      rules: [
        {
          test: /\.jsx?$/,
          exclude: /node_modules/,
          use: {
            loader: 'babel-loader',
            options: {
              presets: ['@babel/preset-env', '@babel/preset-react'],
              plugins: [
                'react-hot-loader/babel'
              ]
            }
          }
        }
      ],
    },
    plugins: [
      new webpack.HotModuleReplacementPlugin(),
      new webpack.NamedModulesPlugin(),
      new HtmlWebpackPlugin({
        template:'template.ejs',
        appMountId: 'react-app-root',
        title: 'Basic Redux',
        filename: resolve(__dirname, "build", "index.html"),
      }),
    ]
  };