title: ReactJS Syntax Error: Unexpected Token
body: <p>I am getting the Unexpected Token on my ReactJS application. But I believe the syntax is correct.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React, { Component } from 'react';
  
  class Auth extends Component {
      constructor(){
          super()
          this.state={
              authStatus: "Sign In",
              isAuthenticated: false
          }
      }
      AuthMe = () =&gt;{
          console.log("Working")
      }
      render() {
          return (
              &lt;button type="button" onClick={this.AuthMe}&gt;{this.state.authStatus}&lt;/button&gt;
          );
      }
  }
  
  export default Auth;</code></pre>
  </div>
  </div>
  </p>
  
  <p>ERROR in ./src/components/Auth/index.js
  Module build failed: SyntaxError: Unexpected token (11:11)</p>
  
  <pre><code>&gt; 11 |     AuthMe = () =&gt;{
       |            ^
    12 |         console.log("Working")
    13 |     }
  </code></pre>
  
  <p>What am I missing?</p>
  
  <h2>UPDATE</h2>
  
  <p>Here's my webpack.config.js</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const path = require('path');
  module.exports = {
    entry: './src/index.js',
    output: {
      filename: 'bundle.js',
      path: path.resolve(__dirname, 'dist'),
      publicPath: '/',
    },
    module: {
      rules: [{
        test: /\.jsx?$/,
        exclude: [
          path.resolve(__dirname, 'node_modules'),
        ],
        loader: 'babel-loader',
      }]
    },
    resolve: {
      extensions: ['.json', '.js', '.jsx', '.css']
    },
    devtool: 'source-map',
    devServer: {
      historyApiFallback: true
    }
  };</code></pre>
  </div>
  </div>
  </p>
  
  <p>.babelrc</p>
  
  <pre><code>{
      "presets": ["es2015","react","stage-0"],
      "plugins": ["transform-decorators-legacy"]
  }
  </code></pre>