Add homepage example without the full domain#11082
Conversation
|
Hi @camjackson! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
@camjackson I am facing issue for Scenario 2, I tried setting the homepage to "." but this ends in a situation where: www.myApp.com works as expected which is good www.anotherSite.com/myApp does not work at all -> white page with error showing enter image description here Do you have any solution for this case? |
|
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |

Consider 3 different possibilities for where an app will be deployed:
example.com/my-app)example.com/my-appbut alsorandom.com/blah)example.com/my-appandtest.example.com/my-app)Scenario 1 is well-documented at "Deployment - Building for relative paths":
Scenario 2 is well-documented at Deployment - Serving the Same Build from Different Paths, including the caveat that it breaks client-side routing:
Scenario 3 does not have a documented solution, despite it being the most common one in my experience. As far as I can tell, the following configuration works perfectly well:
But after much searching I haven't seen anywhere on the internet that mentions the ability to specify
homepagewith just a path and no domain.This PR adds that example to the docs. Here's how it looks: