title: Configuring React webpack.config.js
body: <p>I found this code online to create a webpack for react.. what exactly is happening here? I need something like this to be able to use react right? I'm quite confused.</p>
  
  <pre><code>const path = require('path');
  
  const SRC_DIR = path.resolve(__dirname, 'client');
  const BUILD_DIR = path.resolve(__dirname, 'client');
  
  module.exports = {
    entry: path.resolve(SRC_DIR, 'client-app.js'),
    output: {
      filename: 'bundle.js',
      path: BUILD_DIR
    },
    module: {
      rules: [
        {
          test: /\.(js|jsx)$/,
          exclude: [/node_modules/],
          use: [{
            loader: 'babel-loader',
            options: { presets: ['es2015', 'react'] }
          }],
        }
      ]
    }
  }
  </code></pre>
  
  <p>Why is it asking me to please add some context? I am trying to add more details so that this question can be posted</p>