Unexpected Token ‘<' client_bundle.js:1
Unexpected Token ‘<‘, I got this message while I was working on one of my React / Webpack projects on Churgle, a website that has tools and utilities. The error in my case manifested itself on single a page reachable through a React route. It didn’t matter if I changed the order of any routes, nor if I changed which route that led to a specific page. Which meant that this was not a content issue related to a specific page.
In the end, after I completed my troubleshooting, it turned out to be an issue with Webpack. The solution in my case was to add a <base href=”/”> element to the head section of my HTML page.
Thank you to @hemedani for figuring this issue out. Link to the page that contained the solution