title: In React, how do I deploy to multiple environments while using “homepage” property in package.json?
body: <p>How do I set the <a href="https://create-react-app.dev/docs/deployment/#building-for-relative-paths" rel="nofollow noreferrer"><code>homepage</code></a> property in <code>package.json</code> if it depends where I deploy to? For my testing environment, the URL would be (for example) <code>testing.example.com/my-app/home</code>. But in production, the URL would be <code>example.com/my-app/home</code>. So what do I put as the homepage property <code>package.json</code>?</p>