ReactJS Module build failed: SyntaxError: Unexpected token - ReactDOM.render : <p>Why am I getting this error below? My statement <code>ReactDOM.render(&lt;App /&gt;, container);</code> is 100% legit code.</p>

<p>My github repo: <a href="https://github.com/leongaban/react_starwars" rel="noreferrer">https://github.com/leongaban/react_starwars</a></p>

<p><a href="https://i.stack.imgur.com/FR8Ae.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/FR8Ae.jpg" alt="enter image description here"></a></p>

<p>The app.js file</p>

<pre><code>import react from 'react'
import ReactDom from 'react-dom'
import App from 'components/App'

require('index.html');

// Create app
const container = document.getElementById('app-container');

// Render app
ReactDOM.render(&lt;App /&gt;, container);
</code></pre>

<p>The components/App file</p>

<pre><code>import React from 'react'

const App = () =&gt;
  &lt;div className='container'&gt;
    &lt;div className='row'&gt;

    &lt;/div&gt;
    &lt;div className='row'&gt;

    &lt;/div&gt;
  &lt;/div&gt;;

export default App; 
</code></pre>

<p>My webpack.config</p>

<pre><code>const webpack = require('webpack');
const path = require('path');

module.exports = {
entry: [
  './src/app.js'
],
output: {
  path: path.resolve(__dirname, './build'),
  filename: 'app.bundle.js',
},
module: {
  loaders: [
    {
      test: /\.html$/,
      loader: 'file-loader?name=[name].[ext]',
    },
    {
      test: /\.jsx?$/,
      exclude: /node_modules/,
      loader: 'babel-loader',
    },
  ],
},
plugins: [
  new webpack.NamedModulesPlugin(),
]
};
</code></pre>
