title: Unexpected token - React babel
body: <p>I am new to the world react and I have a bug that will not let me progress. This is my webpack</p>
  
  <pre><code>module.exports = {
  entry: [
  './src/index.js'
  ],
  output: {
  path: __dirname,
  publicPath: '/',
  filename: 'bundle.js'
  },
  module: {
   loaders: [{
    exclude: /node_modules/,
    loader: 'babel'
   }]
  }
  resolve: {
   extensions: ['', '.js', '.jsx']
  },
  devServer: {
   historyApiFallback: true,
   contentBase: './'
  }
  };
  </code></pre>
  
  <p>This is my code js</p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  
  import SearchBar from './components/search_bar';
  
  const API = '';
  
  const App = () =&gt; {
   return (
       &lt;div&gt;
           &lt;SearchBar /&gt;
       &lt;/div&gt;
   );
  }
  
  ReactDOM.render(&lt;App /&gt;, document.querySelector('.container'));
  </code></pre>
  
  <p>This is error
  <a href="https://gyazo.com/be83135be6f0e7b8ca0c2852536c792f" rel="nofollow noreferrer">https://gyazo.com/be83135be6f0e7b8ca0c2852536c792f</a></p>
  
  <p>I tried this solution but it does not work
  <a href="https://stackoverflow.com/questions/33460420/babel-loader-jsx-syntaxerror-unexpected-token">babel-loader jsx SyntaxError: Unexpected token</a></p>
  
  <p>This is a project <a href="https://github.com/jmrosdev/Practicas/tree/master/React/youtube-search" rel="nofollow noreferrer">https://github.com/jmrosdev/Practicas/tree/master/React/youtube-search</a></p>
  
  <p>Bye and thanks!</p>