title: ERROR in ./src/index.js 14:4 Module parse failed: Unexpected token (14:4) You may need an appropriate loader to handle this file type
body: <p>I am tryiyng to run react with webpack. I am getting following error:</p>
  
  <p>ERROR in ./src/index.js 14:4
  Module parse failed: Unexpected token (14:4)
  You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.</p>
  
  <pre><code>| ReactDOM.render(
  &gt;     &lt;HashRouter&gt;
  |         &lt;App /&gt;
  |     &lt;/HashRouter&gt;,
  </code></pre>
  
  <p>webpack.config.js</p>
  
  <pre><code>module.exports = {
      entry: path.resolve(__dirname, 'src/App.js'),
      watch: true,
      output: {
          filename: 'bundle.js',
          path: path.resolve(__dirname, 'dist'),
      },
      module: {
          rules: [{
              test: /\.js$/,
              exclude: /(node_modules|bower_components)/,
              use: {
                  loader: 'babel-loader',
              }
          }]
      }, 
  }  
  </code></pre>
  
  <p>package.json</p>
  
  <pre><code>{
    "name": "app-weather",
    "version": "0.1.0",
    "private": true,
    "main": "index.js",
    "dependencies": {
      "bulma": "^0.7.5",
      "dotenv": "^8.0.0",
      "node-sass": "^4.12.0",
      "react": "^16.8.6",
      "react-dom": "^16.8.6",
      "react-router-dom": "^5.0.1",
      "react-scripts": "3.0.1"
    },
    "scripts": {
      "start": "webpack-dev-server",
      "build": "webpack",
      "test": "react-scripts test",
      "eject": "react-scripts eject"
    },
    "eslintConfig": {
      "extends": "react-app"
    },
    "browserslist": {
      "production": [
        "&gt;0.2%",
        "not dead",
        "not op_mini all"
      ],
      "development": [
        "last 1 chrome version",
        "last 1 firefox version",
        "last 1 safari version"
      ]
    },
    "devDependencies": {
      "babel-core": "^6.26.3",
      "babel-loader": "^8.0.6",
      "babel-preset-env": "^1.7.0",
      "babel-preset-react": "^6.24.1",
      "html-webpack-plugin": "^3.2.0",
      "webpack": "^4.39.2",
      "webpack-cli": "^3.3.7",
      "webpack-dev-server": "^3.8.0"
    }
  }
  </code></pre>