title: Webpack throws error about jsx component
body: <p>I have the following jsx component:</p>
  
  <pre><code>import React, { Component } from 'react';
  
  class App extends Component {
      render () {
          return (
              &lt;div className="app"&gt;
                  &lt;h2&gt;Welcome to React&lt;/h2&gt;
              &lt;/div&gt;
          )
      }
  }
  
  export default App;
  </code></pre>
  
  <p>and my webpack file:</p>
  
  <pre><code>const path = require('path');
  const webpack = require('webpack');
  const ExtractTextPlugin = require('extract-text-webpack-plugin');
  
  module.exports = {
      context: path.resolve(__dirname, './src'),
      entry: {
          app: './index.jsx'
      },
      output: {
          filename: '[name].bundle.js',
          path: path.resolve(__dirname, './dist/assets'),
          publicPath: '/assets',
  
      },
      devServer: {
          contentBase: path.resolve(__dirname, './src')
      },
      module: {
          rules: [
              {
                test: /\.jsx$/,
                exclude: [/node-modules/],
                use: [
                  {
                    loader: "babel-loader",
                    options: { presets: ["es2015"] }
                  }
                ]
              },
              {
                  test: /\.css$/,
                  use:  ExtractTextPlugin.extract({
                      use: [{
                          loader: 'css-loader',
                          options: { importLoaders: 1 },
                      }],
                  }),
              },
              {
                test: /\.(sass|scss)$/,
                use: ["style-loader", "css-loader", "sass-loader"]
              }
          ]
      },
      resolve: {
          modules: [ 
              path.resolve(__dirname, './src'),
              'node_modules'
          ]
      },
      plugins: [
          new webpack.optimize.CommonsChunkPlugin({
              name: 'common'
          }),
          new ExtractTextPlugin({
              filename: '[name].bundle.css',
              allChunks: true
          })
      ]
  }
  </code></pre>
  
  <p>however when I run:</p>
  
  <pre><code> node_modules/.bin/webpack -d
  </code></pre>
  
  <p>I get the following error:</p>
  
  <p><a href="https://i.stack.imgur.com/hSqlP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hSqlP.png" alt="enter image description here"></a></p>