text: const path = require('path');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const ESLintPlugin = require('eslint-webpack-plugin');
  const Dotenv = require('dotenv-webpack');
  
  module.exports = {
    mode: 'development',
    entry: path.join(__dirname, 'src', 'index.js'),
    output: {
      path: path.join(__dirname, 'dist'),
    },
    watchOptions: {
      aggregateTimeout: 10000,
    },
    devServer: {
      port: 8080,
      hot: true,
      open: true,
      historyApiFallback: true,
      watchFiles: ['src/**/*.js', 'src/**/*.jsx', 'src/**/*'],
      devMiddleware: {
        writeToDisk: true,
      },
      client: {
        overlay: {
          errors: false,
          warnings: false,
        },
      },
    },
    module: {
      rules: [
        {
          test: /\.(jsx|js)$/,
          include: path.resolve(__dirname, 'node_modules'),
          use: ['babel-loader'],
        },
        {
          test: /\.(png|jpe?g|gif|mp4|pdf)$/i,
          loader: 'file-loader',
          options: {
            name: '[path][name].[ext]',
          },
        },
        {
          test: /\.(jsx|js)$/,
          include: [path.resolve(__dirname, './src')],
          use: ['babel-loader', 'eslint-loader'],
        },
      ],
    },
    resolve: {
      extensions: ['.js', '.jsx'],
    },
    plugins: [
      new HtmlWebpackPlugin({
        template: path.join(__dirname, 'public', 'index.html'),
      }),
      new ESLintPlugin({
        cache: true,
        eslintPath: require.resolve('eslint'),
        resolvePluginsRelativeTo: __dirname,
        ignore: true,
        useEslintrc: true,
        extensions: ['.js', '.jsx'],
        files: [path.join(__dirname, 'src')],
        fix: true,
        emitError: true,
        failOnError: false,
        emitWarning: true,
        failOnWarning: false,
      }),
      new Dotenv({
        path: './.env',
        safe: true,
      }),
    ],
  };
  