'Issue rendering ReactJS production build
I have created a three page react application using react-router-dom that also uses a proxy to make calls to the node API on my web server. When running the application in development everything runs as expected. My issues are after building it no longer renders anything on the screen. The weird thing is that I'm not receiving any errors in the console but through debugging I've noticed it does load the page until I call my API and then it goes blank. Does anyone know why this may be affecting the production build but not the development build? I've added:
"homepage": "."
to my package.json as it worked for someone else who asked the same question but it has made no difference for me. I've linked the code if anyone wants to take a look. Any insight would be greatly appreciated. Link to code
Solution 1:[1]
For anyone else who may stumble across this. It was due to issues with the proxy in the package.json. After removing the proxy and calling the API manually, there were no longer any issues.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | christhedev_ |
