title: Webpack build React.createClass is not a function
body: <p>I have a <strong><code>ReactJS</code></strong> application with <strong><code>webpack</code></strong> module builder, following is the configuration in my <code>webpack.config.js</code></p>
  
  <pre><code>var path = require('path');
  var webpack = require('webpack');
  
  module.exports = {
      entry: {
          app : './src/scripts/app.js'
      },
      output: {
          filename: '[name].bundle.js',
          path: path.resolve(__dirname, 'public')
      },
      context: __dirname,
      resolve: {
          extensions: ['.js', '.jsx', '.json', '*']
      },
      module: {
          rules: [
              {
                  test: /\.jsx?$/,
                  exclude: /(node_modules|bower_components)/,
                  loader: 'babel-loader',
                  options: {
                      presets: ['react', 'es2015']
                  }
              },
              {
                  test: /\.css$/,
                  use: [
                      'style-loader',
                      'css-loader'
                  ]
              },
              {
                  test: /\.(png|svg|jpg|gif)$/,
                  use: [
                      'file-loader'
                  ]
              },
              {
                  test: /\.(woff|woff2|eot|ttf|otf)$/,
                  use: [
                      'file-loader'
                  ]
              }
          ]
      }
  };
  </code></pre>
  
  <hr>
  
  <p>I have following code in my <code>app.js</code></p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  
  var MainApp =  React.createClass({
      render: function(){
          return (
              &lt;div&gt;
                  &lt;div&gt;Header component&lt;/div&gt;
                  &lt;div&gt;Boady component&lt;/div&gt;
              &lt;/div&gt;
          );
      }
  });
  
  ReactDOM.render(
      &lt;MainApp /&gt;,
      document.getElementById('container')
  );
  </code></pre>
  
  <p>Now after running the server, when I load my page in browser getting following error:</p>
  
  <blockquote>
    <p>Uncaught TypeError: _react2.default.createClass is not a function</p>
  </blockquote>
  
  <p>Attaching screenshot of the error message:
  <a href="https://i.stack.imgur.com/EAk1K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EAk1K.png" alt="enter image description here"></a></p>
  
  <p>I would like to know more details on this issue, many thanks for the help.</p>