You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
your comment on facebook/create-react-app#2353 brought me here. I'm facing the problem that a client wants to serve ONE CRA build on different static server without using pipelines etc.. So the "PUBLIC_URL" would need to change post build based on a config file so the files can be server from the correct "static" folder.
You are writing
When serving the files, I also implemented some best-match redirects to allow the app base url (PUBLIC_URL) to be configured at runtime as well.
Could you please point me in the right direction? I can't find anything about "best-match redirects" in the docs.
Cheers
The text was updated successfully, but these errors were encountered:
Hey @kkarkos , sorry for the late reply, I saw the issue while on vacation and then forgot about it.
The comment you quoted was a bit inaccurate on my part, and so maybe a bit misleading. app-server does not dynamically change your app's PUBLIC_URL, rather, it serves the correct content even when you set PUBLIC_URL (at build time) to ., making all links relative. The outcome though is basically the same: at runtime you can change the base url of the app without having to rebuild it (though you might have to change app-server's config option --basePath, but that's a runtime configuration). Here you can find a bit of documentation explaining how requests are routed so that the correct content is served.
Hi,
your comment on facebook/create-react-app#2353 brought me here. I'm facing the problem that a client wants to serve ONE CRA build on different static server without using pipelines etc.. So the "PUBLIC_URL" would need to change post build based on a config file so the files can be server from the correct "static" folder.
You are writing
Could you please point me in the right direction? I can't find anything about "best-match redirects" in the docs.
Cheers
The text was updated successfully, but these errors were encountered: