I have a react app and I run npm run build to generate a build package that I upload to S3. let's say www.test.com/build/
but I have a PHP backend that should be responsible for serving the index.html (from www.test.com/index.html)
since there's no connection with the S3 bucket and the PHP app I don't know how to deal with the hashed names in the react app
I can't generate the build package without the hashes because I will lose the cache buster.
what are some good practices to work with react apps and backend apps. In this case is PHP but I think the problem should be the same with a NodeJS backend hosted in a different server.
I'm using AWS CodePipeline to build the react app (npm run build) and the php app (composer install)
from Using PHP backend with React Application
No comments:
Post a Comment