title: Uncaught SyntaxError: Unexpected token '<' in bundle.js:1
body: <p>I'm setting up boilerplate for react web apps and getting a blank page with the above console error when navigating to <code>http://localhost:3000</code>. I am a fresh bootcamp student and my knowledge of webpack config is very shallow, especially with lots of dependencies/babel setup in play. I reviewed responses to other users posting this issue, but it seems it can be caused by any number of issues around webpack config, and I'm worried about breaking things further while under a tight time constraint.</p>
  
  <p>So I posted some of my code below. I am quite stuck- thanks for any pointers!</p>
  
  <p><strong>public/index.html</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;title&gt;-= PROJECT TITLE PLACEHOLDER =-&lt;/title&gt;
    &lt;script src="/bundle.js" defer&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id="app"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>app/index.js</strong></p>
  
  <pre><code>import '../public/style.css'
  import React from 'react'
  import ReactDOM from 'react-dom'
  import { Provider } from 'react-redux'
  import store from './redux'
  import Users from './components/Users'
  
  ReactDOM.render(
    &lt;Provider store={store}&gt;
      &lt;Users /&gt;
    &lt;/Provider&gt;,
    document.getElementById('app')
  )
  </code></pre>
  
  <p><strong>webpack.config.js</strong></p>
  
  <pre><code>'use strict'
  
  const { resolve } = require('path')
  
  module.exports = {
    entry: ['babel-polyfill', './app/index'],
    output: {
      path: __dirname,
      filename: './public/bundle.js'
    },
    mode: 'development',
    context: __dirname,
    devtool: 'source-map',
    resolve: {
      extensions: ['.js', '.jsx']
    },
    module: {
      rules: [
        {
          test: /jsx?$/,
          include: resolve(__dirname, './app'),
          loader: 'babel-loader',
          options: {
            presets: ['react']
          }
        },
        {
          test: /\.css$/,
          use: [
            'style-loader',
            'css-loader'
          ]
        }
      ]
    }
  }
  </code></pre>
  
  <p><strong>package.json</strong></p>
  
  <pre><code>{
    "name": "boilermaker",
    "version": "0.0.1",
    "description": "boilerplate for react-redux-express-sequelize app",
    "main": "server/index.js",
    "scripts": {
      "start-dev": "npm run build-watch &amp; npm run start-server",
      "start-server": "nodemon --watch server -e js,html --ignore public server/index.js",
      "build-watch": "webpack -w",
      "start": "echo 'Running server for production - developers, use npm run start-dev for development' &amp;&amp; node server/index.js",
      "seed": "node seed.js"
    },
    "keywords": [
      "react",
      "redux",
      "skeleton"
    ],
    "dependencies": {
      "axios": "^0.18.0",
      "body-parser": "^1.18.2",
      "chalk": "^2.4.1",
      "connect-session-sequelize": "^6.0.0",
      "crypto": "^1.0.1",
      "express": "^4.14.0",
      "express-session": "^1.17.0",
      "lodash": "^4.17.15",
      "morgan": "^1.9.1",
      "passport": "^0.4.0",
      "passport-google-oauth": "^2.0.0",
      "pg": "^7.4.3",
      "react": "^16.8.6",
      "react-dom": "^16.8.6",
      "react-redux": "^5.0.7",
      "react-router": "^4.3.1",
      "react-router-dom": "^4.2.2",
      "redux": "^4.0.0",
      "redux-logger": "^3.0.6",
      "redux-thunk": "^2.2.0",
      "sequelize": "^4.37.8"
    },
    "devDependencies": {
      "babel-core": "^6.26.3",
      "babel-eslint": "^8.2.3",
      "babel-loader": "^7.1.4",
      "babel-polyfill": "^6.26.0",
      "babel-preset-env": "^1.7.0",
      "babel-preset-react": "^6.24.1",
      "babel-preset-stage-2": "^6.24.1",
      "babel-register": "^6.26.0",
      "css-loader": "^2.1.1",
      "eslint": "^4.19.1",
      "eslint-config-fullstack": "^5.0.0",
      "eslint-plugin-react": "^7.8.2",
      "nodemon": "^1.19.1",
      "redux-devtools-extension": "^2.13.8",
      "style-loader": "^0.21.0",
      "webpack": "^4.39.2",
      "webpack-cli": "^3.3.7"
    }
  }
  </code></pre>
  
  <p><strong>.babelrc</strong></p>
  
  <pre><code>{
    "presets": ["babel-preset-react", "react", "env", "stage-2"]
  }
  </code></pre>