[Answered ]-Webpack: "Uncaught SyntaxError: Unexpected token <" in Django

2👍

Try to directly access the JS or CSS file directly on browser, if you are seeing is a 404 error, then you are not handling static files correctly.
you can use dj-static or configure main HTTP server ( Apache or Nginx) handle static file requests.

What happening here is that webpack is trying to load the js files to JS environment, but the url request results in an html file ( probably a 404 error) causing JS syntax error ( xml/html).

Leave a comment