My experience with create react app has been interesting lately.
When I run npm run dev
, everything in my application looks great:
https://i.sstatic.net/lVf7x.png
The button texts are coming from an API call, and all seems to be in order.
But when I tried a production build by running npm run build
followed by serve -s build
, things took a strange turn. The console directed me to http://localhost:5000, where the buttons were no longer visible:
https://i.sstatic.net/a7lzg.png
Surprisingly, the buttons were still there - I could hover over them, click on them, and even see the expected console.logs displaying the button titles.
No errors appeared in the console on http://localhost:5000, and the API response was correct. All files loaded without issue in the network tab.
I've tested this in Chrome, Firefox, and Safari, with each browser experiencing the same problem.
Any thoughts on what could be causing this peculiar behavior?