Created by: camjackson
Consider 3 different possibilities for where an app will be deployed:
- Deploying to just a single domain and path (e.g. always
example.com/my-app
) - Deploying to any arbitrary domain and path (e.g.
example.com/my-app
but alsorandom.com/blah
) - Deploying to multiple domains but always the same path (e.g.
example.com/my-app
andtest.example.com/my-app
)
Scenario 1 is well-documented at "Deployment - Building for relative paths":
"homepage": "http://mywebsite.com/relativepath",
Scenario 2 is well-documented at Deployment - Serving the Same Build from Different Paths, including the caveat that it breaks client-side routing:
"homepage": ".",
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:
"homepage": "/my-app",
But after much searching I haven't seen anywhere on the internet that mentions the ability to specify homepage
with just a path and no domain.
This PR adds that example to the docs. Here's how it looks: