title: Uncaught SyntaxError: Unexpected token < main.b6d3c706.chunk.js:1
body: <p>index.html</p>
  
  <pre><code>  &lt;!DOCTYPE html&gt;
    &lt;html lang="en"&gt;
      &lt;head&gt;
        &lt;meta charset="utf-8" /&gt;
        &lt;link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" /&gt;
        &lt;meta name="viewport" content="width=device-width, initial-scale=1" /&gt;
        &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
        &lt;link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Muli" /&gt;
        &lt;link rel="stylesheet" type="text/css" href="static/css/normalize.css" /&gt;
        &lt;link rel="stylesheet" type="text/css" href="static/css/demo.css" /&gt;
        &lt;link rel="stylesheet" type="text/css" href="static/css/component.css" /&gt;
        &lt;link rel="stylesheet" type="text/css" href="static/css/game.css" /&gt;
        &lt;!-- &lt;link href="css/sb-admin-2.min.css" rel="stylesheet"&gt; --&gt;
        &lt;link href="static/css/graph-cards.css" rel="stylesheet"&gt;
        &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"&gt;
        &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
        &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"&gt;&lt;/script&gt;
        &lt;title&gt;React App&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
        &lt;noscript&gt;You need to enable JavaScript to run this app.&lt;/noscript&gt;
        &lt;body&gt;
        &lt;div id="root"&gt;&lt;/div&gt;
      &lt;/body&gt;
    &lt;/html&gt;
  </code></pre>
  
  <p>package.json</p>
  
  <pre><code>{
    "name": "frontend",
    "version": "0.1.0",
    "private": true,
    "dependencies": {
      "@amcharts/amcharts4": "^4.4.1",
      "@amcharts/amcharts4-geodata": "^4.1.4",
      "history": "^4.9.0",
      "react": "^16.8.6",
      "react-dom": "^16.8.6",
      "react-radio-buttons": "^1.2.2",
      "react-router-dom": "^5.0.0",
      "react-scripts": "2.1.8",
      "tachyons": "^4.11.1"
    },
    "scripts": {
      "start": "react-scripts start",
      "build": "react-scripts build",
      "test": "react-scripts test",
      "eject": "react-scripts eject"
    },
    "eslintConfig": {
      "extends": "react-app"
    },
    "browserslist": [
      "&gt;0.2%",
      "not dead",
      "not ie &lt;= 11",
      "not op_mini all"
    ]
  }
  </code></pre>
  
  <p>index.js</p>
  
  <pre><code>  import React, { Suspense } from 'react';
    import ReactDOM from "react-dom";
    import 'tachyons';
    import { createBrowserHistory } from "history";
    import { Router, Route, Switch } from "react-router-dom";
    import indexRoutes from "routes/index";
  
    var hist = createBrowserHistory();
  
    ReactDOM.render(
      &lt;Router history={hist}&gt;
        &lt;Suspense fallback={&lt;div&gt;Loading...&lt;/div&gt;}&gt;
          &lt;Switch&gt;
            {indexRoutes.map((prop, key) =&gt; {
              return &lt;Route path={prop.path} key={key} component={prop.component} /&gt;;
            })}
          &lt;/Switch&gt;
        &lt;/Suspense&gt;
      &lt;/Router&gt;,
      document.getElementById("root")
    );
  </code></pre>
  
  <p>Here i am using production build of react.
  i am geting  below error in console.</p>
  
  <pre><code>Uncaught SyntaxError: Unexpected token &lt;
  main.b6d3c706.chunk.js:1 Uncaught SyntaxError: Unexpected token &lt;
  </code></pre>
  
  <p>I have shared my index.html, index.js, and package.json</p>
  
  <p>do i need to change any other configuration  in webpack.I have changed the src tags to "text/babel" still it is not working.</p>
  
  <pre><code>  import React from 'react';
  
    const Home = React.lazy(() =&gt; import('views/Home/Home'));
  
  
    var indexRoutes = [
      { path: "/", name: "Home", component: Home }
    ];
  
    export default indexRoutes;
  </code></pre>
  
  <p>Please have a look.</p>