text: const webpack = require('webpack');
  const path = require('path');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
  const OpenBrowserPlugin = require('open-browser-webpack-plugin');
  
  process.env.NODE_ENV = 'development';
  
  module.exports = {
    mode: 'development',
    target: 'web',
    devtool: 'cheap-module-source-map',
    entry: './src/index',
    output: {
      //In development mode, it creates this in memory
      path: path.resolve(__dirname, 'build'),
      publicPath: '/',
      filename: 'bundle.js',
    },
    devServer: {
      stats: 'minimal',
      overlay: true,
      historyApiFallback: true,
      disableHostCheck: true,
      headers: { 'Access-Control-Allow-Origin': '*' },
      https: false,
    },
    plugins: [
      new OpenBrowserPlugin({ url: 'http://localhost:3000' }),
      new webpack.DefinePlugin({
        'process.env.API_URL': JSON.stringify('http://localhost:3001'),
      }),
      new HtmlWebpackPlugin({
        template: 'src/index.html',
      }),
      new FaviconsWebpackPlugin('./src/logo.png'),
    ],
    module: {
      rules: [
        {
          test: /\.(js|jsx)$/,
          exclude: /node_modules/,
          use: ['babel-loader', 'eslint-loader'],
        },
        {
          test: /(\.css)$/,
          use: ['style-loader', 'css-loader'],
        },
        { test: /\.(config)$/, loader: 'file-loader?name=[name].[ext]' },
      ],
    },
  };
  