React webapp - each source file rendering index.html source

0

I have a react web application that builds to a "dist" directory containing all assets. I am using a ELB build with Node.js and nginx, all default settings. The app successfully starts however when I load the page, all of the page assets e.g. js and css files do not render.

Inspecting the source of these files, they do not fail to load, however the source of each returns the html source of the home page, rather than their respective css and js contents.

This indicates some sort of proxy or rewrite issue im guessing but have no idea how to resolve.

Appreciate any guidance.

UPDATE: I can see nginx and node running using 80 and 8081 respectivley:

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 6962/nginx: master
tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN 7061/node

wonka
asked 4 years ago196 views
1 Answer
0

Turns out there was a problem with my react build and the static assets were not being served correctly.

wonka
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions